You are here

Freemat Portable

3 posts / 0 new
Last post
josamen
Offline
Last seen: 4 years 11 months ago
Joined: 2011-01-30 20:25
Freemat Portable

It's good to see that the latest version of Freemat Portable actually runs on my computer now....with the prev. versions all I got was the splash screen and then nothin'

anyhow I was testing out simple 2-D plots of functions of x over a specified range of values for x and the plots I was getting seemed line-drawn instead of curves (I was testing trig function graphs)....then I discovered from the help section that to get a curve instead of line segments being drawn between every point of inflection you first have to define your range of values for x as a linspace....so to get a plot of the sine wave from values of x ranging from 0 to 2*pi you need 2 commands:

x=linspace(0,2*pi);plot(x,sin(x))

aamiel
aamiel's picture
Offline
Last seen: 3 years 5 months ago
Joined: 2008-11-03 04:53
But if you

But if you do:

x=linspace(0,2*pi,10);plot(x,sin(x));

It does not look so good anymore. By default, linspace uses 100 points.

Bart.S
Offline
Last seen: 3 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
:-)

Glad to see that's working for you now.
A good start is reading the FreeMat Primer.

Log in or register to post comments