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

Rank matrix with mixed units

SOLVED

Re: Rank matrix with mixed units

Valery Ochkov wrote:

See too http://communities.ptc.com/message/220306

????? There are no zeros in my example.

Re: Rank matrix with mixed units

Werner Exinger wrote:

Valery Ochkov wrote:

See too http://communities.ptc.com/message/220306

????? There are no zeros in my example.

I would like to point the others part of this discussion - 0A or 0, 0V or 0 etc. in symbolic and numeric math.

Re: Rank matrix with mixed units

Valery Ochkov wrote:

I would like to point the others part of this discussion - 0A or 0, 0V or 0 etc. in symbolic and numeric math.

But I thought that Jakov explained that sufficantly - its the price we have to pay for dynamic unit checking which enables units of different dimensions in one matrix.

I think it should be no problem to consequently write 0V instead of just 0.

Re: Rank matrix with mixed units

Your routine can be written more compact using vectorization, but it (and yours) yields wrong results in some (not so rare) occasions:

21.12.png

Re: Rank matrix with mixed units

Werner Exinger wrote:

Your routine can be written more compact using vectorization, but it (and yours) yields wrong results in some (not so rare) occasions:

21.12.png

Yes! My routine is better for education

And as in "old dood" Mathcad 15:

m := 1 km := 1000m V :=1 etc

Re: Rank matrix with mixed units


Yes! My routine is better for education

Matter of taste and in this case I tend to disagree.

But the critical point is that the routine (both) aren't correct. They yield wrong results as in my second example. They shouldn't give a correct result ("if m=Ohm then rank is 1, otherwise its 2") or at least fail in the secon example if the units don't "match". Writing the routine that way would require loops instead of vectorization anyway ;-)

Re: Rank matrix with mixed units

I hope we have correct rank and others same functions in Prime 4.

Re: Rank matrix with mixed units

Units still are not fully supported throughout - see changing display units for single elelements of a matrix or, as here some functions like rank.

In urgent need you may use the attached, which, when numerically evaluated gives the appropriate error message if the units don't fit and which can be used to get the correct result with symbolical eval. Unfortunately we can't put the latter in a single function as the intermediate numeric evaluation (matrix M2) is needed to get the units correctly simplified an cannot be achieved inside a program, AFAIK.

rank.png