Help with plotting - major problem with field

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with plotting - major problem with field

cheerbb
This post was updated on .
Hi! I've a problem with this task http://i49.tinypic.com/1z6d2xf.jpg - plot in MATLAB all lines which are in the picture but I'm using an octave in home [I hope that at the university these problem won't be ;)]
I've succesfully plotted straight lines but i've major problem with sinus (or tanges,cosinus other function that must be from 0.2 to 0.3,0.01 to 0.06 etc)
I'm typing (in blank m-file) :

t=[1:0.1:9]
y=sin(t)
plot(y)


and octave plot this:

http://tinypic.com/r/4uc56t/6

why it's showing my field as t=[10:90]
this problem appear also in other functions with analogy eg. t=[1:0.01:9]  shows t as from 100 to 900

why?

i'm using octave (3.6.2 if i remembered correctly) + xoctave + packages i installed during installation

please help me ;)
thx in advance
Reply | Threaded
Open this post in threaded view
|

Re: Help with plotting - major problem with

bpabbott
Administrator

On Oct 5, 2012, at 2:14 PM, drugistudent wrote:

> Hi! I'm from Poland and I study at Gdansk University of Technologi - Civil
> Enginerring.
> I've a problem with this task http://i49.tinypic.com/1z6d2xf.jpg - plot in
> MATLAB all lines which are in the picture but I'm using an octave ;)
> I've succesfully plotted straight lines but i've major problem with sinus
> (or tanges,cosinus other function that must be from 0.2 to 0.3,0.01 to 0.06
> etc)
> I'm typing (in blank m-file) :
>
> t=[1:0.1:9]
> y=sin(t)
> plot(y)
>
>
> and octave plot this:
>
> http://tinypic.com/r/4uc56t/6
>
> why it's showing my field as t=[10:90]
> this problem apper also in other function, and it's analogy eg. t=[1:0.01:9]
> it shows t as from 100 to 900
>
> i'm using octave (3.6.2) + xoctave + packages i installed during
> installation
>
> please help me ;)
> thx in advance

You need to include "t" in the plot.

        plot (t, y)

Ben


_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

n/c

cheerbb
This post was updated on .
....
no comment for my mistake ;)

We used matlab 1 year ago and in this year, our first meeting is for repeating basic matlab functions.
I've done more sophisticated tasks (e.g. program computing moments of inertia - Ix Iy - program used function ) but this one , small ploting task was the biggest problem. N Thank's for answer

Cheers