please help me with this one

4 Ansichten (letzte 30 Tage)
Ashutosh  mohan
Ashutosh mohan am 24 Sep. 2016
Bearbeitet: Walter Roberson am 25 Sep. 2016
i want to plot 'V' vs 'th' graph:
V = 0:0.2:10
and
th = 90-(2*atand(exp(-((v-1)/2)))) if V>1 and
th = 0 if V<=1
please help

Akzeptierte Antwort

Satuk Bugrahan
Satuk Bugrahan am 24 Sep. 2016
Bearbeitet: Satuk Bugrahan am 24 Sep. 2016
V=0:0.2:10 ;
th=zeros(1,51);
for n=1:51
if V(n)<=1
th(n)=0 ;
else
th(n)=90-(2*atand(exp(-((V(n)-1)/2)))) ;
end
end
plot (V,th)
title('V vs th')
xlabel('V')
ylabel('th')
This would do it I guess.
  3 Kommentare
Satuk Bugrahan
Satuk Bugrahan am 24 Sep. 2016
Actually I have realised I just misplaced X and Y axis . I have corrected it . No problem at all , cheers .
Ashutosh  mohan
Ashutosh mohan am 25 Sep. 2016
ya.. no problem .. i had corrected it myself.. thanks for the code

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by