The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hi,
I converted a Mathcad 15 file to Prime and most of the results are different. These differences are due to the way in which Mathcad 15 and Prime append vectors vertically (see image).
The solution I found was to transpose the matrix in Prime (see AzD_(j,jw) in image). Unfortunately for this particular Mathcad 15 file, there are several matrices that have the same issue and I would have to transpose each one of them individually.
I wonder if there is a way to automatically change all the matrices in Prime that have this issue. I tried changing the range of (j,jw) without success.
P.S. I attached a Prime and Mathcad file exemplifying the issue.
Thank you!
Solved! Go to Solution.
What you get with
is NOT a vector, Its nothing you can assign to a variable
and so you cannot use it for any further calculations - its useful(?) for display purposes only.
A range is kind of an implicit loop, and, yes, Prime loops in a different way compared to real Mathcad. This should be no problem, though, if you use ranges just for the situations they are made for (index a matrix when defining it, define a plot range, for-loop in a program).
So I can only support Lucs suggestion to create the desired vector in a different way.
Here is yet another function which does the job (in MC15 as well as in Prime)
Of course this small function will deal with matrices of any dimension:
Prime 6 file attached
What is wrong with
That should work in Prime the same as in (real) Mathcad.
And if you have more columns:
Success!
Luc
What you get with
is NOT a vector, Its nothing you can assign to a variable
and so you cannot use it for any further calculations - its useful(?) for display purposes only.
A range is kind of an implicit loop, and, yes, Prime loops in a different way compared to real Mathcad. This should be no problem, though, if you use ranges just for the situations they are made for (index a matrix when defining it, define a plot range, for-loop in a program).
So I can only support Lucs suggestion to create the desired vector in a different way.
Here is yet another function which does the job (in MC15 as well as in Prime)
Of course this small function will deal with matrices of any dimension:
Prime 6 file attached
@Werner_E wrote:
What you get with
is NOT a vector, Its nothing you can assign to a variable
and so you cannot use it for any further calculations - its useful(?) for display purposes only.
A range is kind of an implicit loop, and, yes, Prime loops in a different way compared to real Mathcad. This should be no problem, though, if you use ranges just for the situations they are made for (index a matrix when defining it, define a plot range, for-loop in a program).
So I can only support Lucs suggestion to create the desired vector in a different way.
Here is yet another function which does the job (in MC15 as well as in Prime)
Of course this small function will deal with matrices of any dimension:
Prime 6 file attached
And if you want to handle nested arrays, here's another way using the vec function:
https://community.ptc.com/t5/PTC-Mathcad/The-vec-function/m-p/170273
Stuart