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

## This value must be scalar or matrix error when trying to plot curves  4-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  18-Opal
(To:Snarra2015)

Attached

5 REPLIES 5  10-Marble
(To:Snarra2015)

Maybe so, if I understood you correctly  18-Opal
(To:Snarra2015)

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)|.  4-Participant
(To:MJG)

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?  18-Opal
(To:Snarra2015)

Attached  4-Participant
(To:MJG)

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