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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

11-Garnet

## Multiple Array results

HI,

Please help. What is wrong with this.  I am expecting to have a multiple array in the result .

1 ACCEPTED SOLUTION

Accepted Solutions
21-Topaz II
(To:vlehner)

Do you like the following solution?

25 REPLIES 25
13-Aquamarine
(To:ldante)

Hi Lex,

It should be like that:

Volker

Volker
11-Garnet
(To:vlehner)

Dear Volker

Not like this  I expecting  3 horizontal array and 5 vertical array . I need and result  like this.

How I will get this in programming ?

13-Aquamarine
(To:ldante)

Ah! Ok.

can you attach the file please? (use advanced editor on the right top of the editor)

Volker
21-Topaz II
(To:vlehner)

Do you like the following solution?

11-Garnet
(To:-MFra-)

yes. Thank you very much.

11-Garnet
(To:-MFra-)

Dear F.M.

Hi I am not getting the same result using Prime 4.0

11-Garnet
(To:-MFra-)

Hi

I just miss this . thanks I got it right now.

21-Topaz II
(To:ldante)

Hi,

In matrix algebra (which is a noncommutative algebra), division is not defined. The division becomes the product between one of the two matrices and the inverse of the second one.

11-Garnet
(To:-MFra-)

Can you please send me the file. Its raise to the -1 ?

21-Topaz II
(To:ldante)

endeed, You should illustrate what you want more clearly. Given the above, you can create a program that does all the desired operations between the elements of the two vectors.

11-Garnet
(To:-MFra-)

How to do this in a programming  ?

21-Topaz II
(To:ldante)

it isn't clear what you wont. m/M is a mistake. We can divide, for example, each element of m by each element of each column of M.

24-Ruby II
(To:-MFra-)

Hi,

I guess, he needs something like this.

MH

Martin Hanák
21-Topaz II
(To:MartinHanak)

Hi,

I was referring precisely to this.

11-Garnet
(To:MartinHanak)

The result should be in one box of  matrix or array . I  will give more detail tomorrow . thanks

21-Topaz II
(To:ldante)

That is a generic illustration of the product of a matrix for the inverse of another.

23-Emerald I
(To:ldante)

You can do it without programming:

11-Garnet
(To:Fred_Kohlhepp)

Hi Fred,

24-Ruby II
(To:ldante)

Hi,

MH

Martin Hanák
23-Emerald I
(To:ldante)

In the first problem you sent M was a single column, a vector.  The elements of M could be addressed by a single index, so M_j made sense.

In this second problem M has three columns, so we need two indices to address an element.  So M_j doesn't make sense.

24-Ruby V
(To:ldante)

What kind of output would you expect in that case? Following the logic of your initial question it would be a three dimensional array!

I wished that multidimensional arrays would be implemented in Mathcad but unfortunately they aren't. So the best you could come up wiith is a workaround with a 7 x 1 matrix whose components are 7 x 3 matrices so you get the 147 values you are probably looking for. As an alternative we could create  a 7 x 3 matrix whose components are 7 x 1 vectors.

And if m is a two dimensional matrix, too ->  the result could be a 2D matrix with 2D matrix elements, simulating a fourdimensional matrix.

Before you ask how to implement what you want you should first make clear what exactly a vector divides by a matrix should mean and how you would like this operation to be defined.

11-Garnet
(To:Werner_E)

I seen multiple array are more complicated.   I prepared not  to used it , instead I will  follow  the single column and single index to make my life easy. Thanks.

24-Ruby V
(To:ldante)

Here is yet another method to achieve the same effect.

Prime seems to have an erroneous  rounding method! The value at the upper left, 0.148 / 1.6 is exactly 0,0925, so rounded to 2 decimals it should read 0,092 as is the case in Mathcad 15 and below and NOT 0,093 as Prime is showing.

23-Emerald I
(To:Werner_E)

Hmmm!  I always thought that 5's always went up, so 0.0925 would go to 0.093.

A short search reveals:

According to that rule 0.0925 should round to the nearest "even" number, 0.092.

Prime isn't consistent:

24-Ruby V
(To:Fred_Kohlhepp)

> Hmmm!  I always thought that 5's always went up, so 0.0925 would go to 0.093.

And you are perfectly right! I don't know where I had my mind when I wrote that it should be 0.092 (sure had not the IEEE rules in mind) !

I don't think that Mathcad 15 sticks to the rounding rules you are pointing to - it goes up at 5

The reason for rounding down is simple rounding and conversion (dec to binary and back) errors.

and at 4 its rounded down.

Its interesting that Primes numerics seem to be different and less erroneous than Mathcads in this case.

The inconsistency you noticed may stem from the way the symbolic "float" works. Its not just rounding the end result - it just uses less digits for the whole calculation. But I am not sure where an how the significant digits are cut off. Sure not from the very beginning as otherwise we should see the result as 0.15/1.6=0,094

Announcements
Top Tags