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

Participant

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

6 REPLIES 6

## Re: Basic Function Incorrect Result

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).

## Re: Basic Function Incorrect Result

Thank you

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.

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

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

## Re: Basic Function Incorrect Result

Thank you VERY MUCH!