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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How do I get rid of "The forms of these values must match" error?

eyang
1-Newbie

How do I get rid of "The forms of these values must match" error?

I get the error noted at the bottom. How do I resolve the error message below? I've attached my MathCAD file. Thanks-

rocket.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Raiko
16-Pearl
(To:eyang)

Hello Eunice,

MathCad 15 doesn't like to mix units in an array, so it is best to get rid of them. I took the liberty to edit your document. I hope it shows how to procede.

You might also to distribute the calculations over separate functions - then you could keep the units.

Raiko

View solution in original post

6 REPLIES 6
Raiko
16-Pearl
(To:eyang)

Hello Eunice,

MathCad 15 doesn't like to mix units in an array, so it is best to get rid of them. I took the liberty to edit your document. I hope it shows how to procede.

You might also to distribute the calculations over separate functions - then you could keep the units.

Raiko

eyang
1-Newbie
(To:Raiko)

Raiko,

Thank you!!

Werner_E
24-Ruby V
(To:Raiko)

Raiko already pointed you to the cause of the error. One of the very few advantages of Prime is that it can work with mixed dimensions in a matrix. Unfortunately Prime is missing so much other features compared to Mathcad and has quite some drawbacks so I honestly can't advise using it.

As Raiko has shown you won't need the units if you just want to plot, but it can be convenient to have units for plotting to as you can show the results in different, maybe more appropriate units by dividing the variable by that unit as shown below with the height in mm and the velocity in km/hr.

To add units you simply have to multiply each variable by its appropriate vector. If you intend to do so its probably a good idea to assign the output of the function to a vector consisting of four different variables. Raiko used UnitsOf() to get rid of the units. So the actual unit the value is divided by is determined by the unit setting in your worksheet. You have to assure that later, when th units are (re)added you multiply by the very same unit again, no matter if someone changes the default unit for length from meter to feet. You can achieve this by multiplying by UnitsOf (1 m) and you could as well write UnitsOf(1 km) or UnitsOf(1 ft) - you will get the default length unit set in your sheets preferences.

In my approach I simply divides by meter, etc. and added those very units later. Raikos approach has the benefit that you do not have to think about which dimension the variables are in, Mathcad takes care of it. But you sure have to know about the dimension when you intend to add it later in any case.

eyang
1-Newbie
(To:Werner_E)

Werner and Raiko,

Thank you for your inputs. I like the different approaches. It highlights very clearly on how MathCAD works.

ms.png

Top Tags