Skip to main content
12-Amethyst
July 4, 2020
Solved

Why is there an error when I don't put unit and no error when I put something similar in matrix?

  • July 4, 2020
  • 2 replies
  • 2148 views

yoohooos_1-1593861842990.png

 

As in the picture, when I compute X the first time, I didn't put any units(because there is no unit), and it gave me error. I resolve the problem by put its unit as lbf/lbf, which is also unitless, same as previous, but now it worked. Why does this occur? Also, if I would like to change the result unit in the matrix, is there a way to do it? Or I can only do it explicitly.

Best answer by Fred_Kohlhepp

I think it's because your matrix has mixed units, Prime's unit checking software needs to have units on all components to understand.  (Be happy--Mathcad 15 and earlier would have choked on your mixed unit matrix completely.)

 

As far as changing the units, the only way I know of is element-by element:

FredKohlhepp_0-1593864770161.png

 

2 replies

23-Emerald I
July 4, 2020

I think it's because your matrix has mixed units, Prime's unit checking software needs to have units on all components to understand.  (Be happy--Mathcad 15 and earlier would have choked on your mixed unit matrix completely.)

 

As far as changing the units, the only way I know of is element-by element:

FredKohlhepp_0-1593864770161.png

 

yoohooos12-AmethystAuthor
12-Amethyst
July 4, 2020

Thank you very much! Seems like Prime has some advantages over Mathcad 15 and below. I used to think Prime only has disadvantages compared to Mathcad 15 and below. 

25-Diamond I
July 4, 2020

You may want to scan the Prime documentation and look up the chapter about the use of "Zero" and "zero":

Werner_E_0-1593867245150.png

 

And yes, Prime indeed has some advantages compared to good old Mathcad. Better (but still not perfect) handling of units (and also allowing mixed units/dimensions in matrices) is one of them. The way we can enter a matrix and resize it dynamically is another one (the way that scrolling through large matrices is implemented is a nightmare on the other hand). I like particularly the Ctrl-J feature when writing a program (we can simply type "for", "if" etc. and follow it by Ctrl-J and Prime will create the appropriate structure).
Nevertheless, many participants here (including myself) believe that the disadvantages and lack of functionality of Prime predominate and therefore still prefer Mathcad.

 

And as Fred already wrote - its an annoyance that we can't chose the units of the elements in a matrix - we can only chose ONE unit which applies for all elements and elements of different dimension are changed accordingly - often with undesired side effects:

Werner_E_0-1593868024785.png