cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

7-Bedrock

## Default vertical concatenation. Difference between Prime and Mathcad 15

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!

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:DM_10127316)

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

3 REPLIES 3
23-Emerald III
(To:DM_10127316)

What is wrong with

That should work in Prime the same as in (real) Mathcad.

And if you have more columns:

Success!
Luc

24-Ruby V
(To:DM_10127316)

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

23-Emerald II
(To:Werner_E)

@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: