How to write sin=(1/2*x)?
Ältere Kommentare anzeigen

Someone know how should I write this function? When I show this code graph doesnt look right.
x= [0:0.01:2*pi];
y= sin(1/2*x);
figure(1);
plot(x,y,'g');
1 Kommentar
Antworten (2)
madhan ravi
am 28 Nov. 2018
Bearbeitet: madhan ravi
am 28 Nov. 2018
Actually your graph looks alright just increase your domain interval
syms x
y=sin((1/2)*x)
fplot(y,[0 6*pi]) % domain is from 0 to 6pi
This is the graph when I increased your domain (in your code)

Michaela Novotna
am 28 Nov. 2018
0 Stimmen
1 Kommentar
Jan
am 28 Nov. 2018
What does "good" mean here? What is the relation of the code to the original question? What do you try to achieve?
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
