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

This value must be scalar or matrix error when trying to plot curves

SOLVED
Highlighted
Participant

This value must be scalar or matrix error when trying to plot curves

Hello everyone,

I am having issues with using the range function in mathcad to plot two functions I have written. The range variable I have created is presenting an error when I include it in one of my functions in order to generate the independent variables that will be used by the other 2 functions. It seems like there should be a fairly simple solution to this issue but this is my first time using mathcad so I don't seem to have the knowledge to solve it. I have attached my file where it is possible to see the issue that I have. THank you for your time, and I hope that you can help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: This value must be scalar or matrix error when trying to plot curves

5 REPLIES 5
Highlighted

Re: This value must be scalar or matrix error when trying to plot curves

Maybe so, if I understood you correctly

Highlighted

Re: This value must be scalar or matrix error when trying to plot curves

your variable fi utilizes the literal subscript (f.i), but should use the index subscript (f[i)

Then, your graphs should be plotted M(f) over f instead of M(f.i) over f.i.

 

However, after making these two changes, an error still exists with M(f).  I didn't follow the math to understand what.

 

 

Edit:

Think I found the cause of the error:

M(f):=20*log(|T(f)|)

In this equation, Mathcad is taking the determinate of T(f) instead of taking the absolute value of each element of T(f).

One solution is to use the vectorize modifier (Ctrl-) over |T(f)|.

Highlighted

Re: This value must be scalar or matrix error when trying to plot curves

Thanks for the suggestions. I don't really know how to implement them, however.  Could you post the file with these changes made so I can see if they give me the expected result?

Highlighted

Re: This value must be scalar or matrix error when trying to plot curves

Highlighted

Re: This value must be scalar or matrix error when trying to plot curves

Thank you very much. Those were exactly the results I expected to see.

Announcements