Author Topic: error on plotting  (Read 899 times)

Offline KK

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
error on plotting
« on: October 15, 2009, 05:47:26 AM »
Hi,
I encountered error on how to get it link? Below is my coding, i dont know where goes wrong. Can someone help me? Thanks

________________________________________________________

??? TT =
|
Error: Expression or statement is incomplete or incorrect.
_________________________________________________________
TT =
0 0 0 0
0.0000 0.0000 -0.0000 -0.0000
0.0002 0.0001 0.0000 0.0000
0.0012 0.0004 0.0000 0.0000
0.0062 0.0021 0.0000 0.0000
0.0309 0.0103 0.0003 0.0001
0.0651 0.0217 0.0027 0.0005
0.0989 0.0330 0.0094 0.0019
0.1395 0.0465 0.0265 0.0054
0.1947 0.0649 0.0708 0.0146
0.2746 0.0915 0.1906 0.0402


yr1=TT(:,1)'*0.8636;
yr2=TT(:,2)'*0.2;
y1=TT(:,3)'*0.8636;
y2=TT(:,4)'*.2;
axis([0 180 -.1 1.1]);
plot(t,yr1,t,y1,t,yr2,t,y2);
xlabel('Concentration ');
ylabel('Diluttion');

Offline jjasso5

  • Newbie
  • *
  • Posts: 3
  • Matlab Forum
    • View Profile
Re: error on plotting
« Reply #1 on: October 16, 2009, 10:57:46 PM »
Try this:

TT =[0 0 0 0
0.0000 0.0000 -0.0000 -0.0000
0.0002 0.0001 0.0000 0.0000
0.0012 0.0004 0.0000 0.0000
0.0062 0.0021 0.0000 0.0000
0.0309 0.0103 0.0003 0.0001
0.0651 0.0217 0.0027 0.0005
0.0989 0.0330 0.0094 0.0019
0.1395 0.0465 0.0265 0.0054
0.1947 0.0649 0.0708 0.0146
0.2746 0.0915 0.1906 0.0402]


yr1=TT(:,1)'*0.8636;
yr2=TT(:,2)'*0.2;
y1=TT(:,3)'*0.8636;
y2=TT(:,4)'*.2;
axis([0 180 -.1 1.1]);
plot(TT(:,1),yr1,TT(:,2),y1,TT(:,3),yr2,TT(:,4),y2);
xlabel('Concentration ');
ylabel('Diluttion');

Offline anna

  • Banned
  • *
  • Posts: 14
  • Matlab Forum
    • View Profile
Re: error on plotting
« Reply #2 on: October 25, 2010, 05:01:48 AM »
It seems it is not entirely accurate

Matlab and SimuLink Development Forum

Re: error on plotting
« Reply #2 on: October 25, 2010, 05:01:48 AM »