Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- This value must be scalar or matrix error when try...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:16 PM

08-30-2017
02:16 PM

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.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:49 PM

08-30-2017
02:49 PM

Attached

5 REPLIES 5

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:27 PM

08-30-2017
02:27 PM

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

Maybe so, if I understood you correctly

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:33 PM

08-30-2017
02:33 PM

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
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:46 PM

08-30-2017
02:46 PM

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:49 PM

08-30-2017
02:49 PM

Attached

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-30-2017
02:54 PM

08-30-2017
02:54 PM

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.