trouble plotting curved line
Show older comments
I'm trying to plot a curved line but it keeps coming out linear. I was told it could be because I linspaced both the T and S variables but I changed the S vectors and it still comes out linear. The for loop produces the correct values I need so I'm not sure where I'm going wrong. Any help would be appreciated
T4=833.15;
Tmax=1407;
st1=1.661;
T2ac=603;
st2ac=2.4143;
S2ac=6.193;
st3=3.368;
S3ac=7.8666;
st_23=st2ac:.001:st3;
for i=1:length(st_23)
DDD(i)=st_23(i)-st2ac+S2ac;
end
t_2_3=linspace(T2ac,Tmax,length(DDD));
plot(DDD,t_2_3)
Answers (1)
I'm not sure what you are trying to graph. I don't know what the T and S variable are suppose to be. Here is a guess of what I think you could be looking for:
T4=833.15;
Tmax=1407;
st1=1.661;
T2ac=603;
st2ac=2.4143;
S2ac=6.193;
st3=3.368;
S3ac=7.8666;
st_23=st2ac:.001:st3;
DDD(1:length(st_23))=st_23(1:length(st_23))-st2ac+S2ac;
t_2_3=linspace(T2ac,Tmax,length(DDD));
semilogx(t_2_3,DDD)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
