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
- :
- Basic Function Incorrect Result

Options

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

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

Showing results for

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

11-22-2018
07:52 PM

11-22-2018
07:52 PM

Basic Function Incorrect Result

Greetings,

I just started learning Mathcad and have been getting incorrect calculations using the sin function, when t=1s and 2s, Mathcad gives me the same result and the result is not even correct (t=1s, it should've been 3.41 not 4.33; when t=2s, it should've been 2.193), I am also getting a straight curve instead of a sin wave. Can anybody help me out?

Labels:

6 REPLIES 6

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

11-22-2018
10:51 PM

11-22-2018
10:51 PM

Re: Basic Function Incorrect Result

Change your Range Variable, t....

You are plotting only 2 points -1 and 0.001 and it is drawing a line between the two points. The first point is -1 sec - the second point is 0.001 seconds - that gives an interval of 1.001 seconds - therefore the thirdpoint would be 1.002 seconds which is larger than the final limit of 1sec....

You clearly wanted to plot from -1. to +1sec in 0.001 intervals....

Change the range variable to

t:=-1 s,-0.999 s .. 1 s

that should fix it....

Hope that helps....(dont have MC installed at home so I cant fix it or show an example).

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

11-22-2018
11:04 PM

11-22-2018
11:04 PM

Re: Basic Function Incorrect Result

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

11-22-2018
11:06 PM

11-22-2018
11:06 PM

Re: Basic Function Incorrect Result

Thank you mpomerleau!

Do you know why when I used t=1sec and t=2sec, I was getting the same and incorrect result from E(t)? The results should be different.

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

11-22-2018
11:10 PM

11-22-2018
11:10 PM

Re: Basic Function Incorrect Result

Thank you for your reply ValeryOchkov. I still don't know why E(t) function gives me the same result even though I specified two different variables for t=1s and t=2s. Could you shed some lights on it?

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

11-22-2018
11:43 PM

11-22-2018
11:43 PM

Re: Basic Function Incorrect Result

Yeah,

Those answers are both correct - because your frequency is an integer.

Your function is periodic - freq - 60 Hz. It repeats exactly 60 times a second......

In the time interval from One Second to two seconds you would have gone through exactly 60 cycles - and be at exactly the same point. Any interval which was a multiple of 1/60 seconds would get you exactly the same value.

Change your frequency to a non integer - i.e. (60.1 Hz and you will not have the same value at 1 and 2 seconds).

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

11-22-2018
11:48 PM

11-22-2018
11:48 PM

Re: Basic Function Incorrect Result

Thank you VERY MUCH!

Top Tags