Ploting unitless data against data with units
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
6.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you show us what D is? Does D already have units? Did you create D by augmentation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
