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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Ploting unitless data against data with units

ptc-4932387
4-Participant

Ploting unitless data against data with units

I am trying to make a plot of the dependent variable digital data (zeros and ones) in a column of a matrix vs another column (independent variable - x axis) that has units of degrees.  If I add volts units to the dependent variable it plots fine but as soon as I eliminate the units then the error "The values in the axes placeholders must be real numbers or expressions. Make sure the values are of the same type in both placeholders" is returned.

The plot with the errors has the Y variable as a column of the matrix that is unitless.  The one that works has been fudged by adding units to that column.

 

Capture2.PNG

Capture1.PNG

  

1 ACCEPTED SOLUTION

Accepted Solutions

I'm sorry.  I have solved it.  My routine was leaving a few rows at the end of the matrix with units.  This led to mixed units.  It is fixed now.  Thank you!

View solution in original post

7 REPLIES 7

We would have to see the worksheet itself not just a picture to be of help, I guess.

Using some random test data all works as expected

Werner_E_0-1645134113144.png

 

0 is fine as a unitless number because it has no effect on any number with units. You'll get an error that says something about imaginary numbers (like the one you got) when there's a mixture of units in the array. 

 

If you want to work around it, just use the symbol for currency or define your own unit with the triple equals sign. 

 

What version of MathCAD are you using?


@KevinFinity wrote:

0 is fine as a unitless number because it has no effect on any number with units. You'll get an error that says something about imaginary numbers (like the one you got) when there's a mixture of units in the array. 

 

If you want to work around it, just use the symbol for currency or define your own unit with the triple equals sign. 

 

What version of MathCAD are you using?


Looking at the picture which was posted it should be clear that @ptc-4932387  is using Prime.

And Prime is just happy with a mixture of units in an array.

Not sure how using the money "unit" (as its called in Prime) would help.

 

 

6.00

Can you show us what D is?  Does D already have units? Did you create D by augmentation?

I'm sorry.  I have solved it.  My routine was leaving a few rows at the end of the matrix with units.  This led to mixed units.  It is fixed now.  Thank you!


@ptc-4932387 wrote:

I'm sorry.  I have solved it.  My routine was leaving a few rows at the end of the matrix with units.  This led to mixed units.  It is fixed now.  Thank you!


Mixed units in a row should be no problem as long as every column you use for plotting is unit consistent.

Anyway, glad you found a solution for your problem.

Top Tags