Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: Matrix function Issues

$
0
0

The way you used the range variables and defined your vector singly is a bit irritating.

 

You have to be aware that Mathcad would begin the index count of vecors and matrices by 0. Thats the reason your 4-element vectors are 5x1 matrices with the first element set to zero. You should consider that fact and correct your indices accordingly. You can set the system variable ORIGIN to 1 to change that behaviour, but usually its a good idea to leave it at the default value 0.

 

One way to achieve what you want is the following which does not make use of the range variable j, but uses vectorization. Note that setting w[0 to 1 is only necessary because of the problem described above. If you change your vector definition that would be no longer necessary.

matrixfunction.png


Viewing all articles
Browse latest Browse all 12488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>