Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Plot:Connect few points and form a line
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
HsiaoTing Ko

Posts: 1
Registered: 11/12/13
Plot:Connect few points and form a line
Posted: Nov 12, 2013 4:30 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

%Elastic Modulus--YM=YA=Y(MPa)
Y=62000;

%Transformation Temp(degree C)
MF=10;
MS=17;
AS=31;
AF=44;

%Transformation Constatns--CM=CA=C(MPa/degree)
C=7;

%Max Recoverable Strain
SL=0.06;

%Room Temp--theta(degree)
theta=23;

Tb=C*(AF-MS);

Tc=Tb+C*(MS-MF);

Td=Tc-C*(AS-MF);

T= Tb:Tc;

%Fraction of Martensite--Xi
Xi3=(0.5).*cos((3.14159).*((theta-(T/C)-MF)./(MS-MF)))+(0.5);

Sb=Tb/Y;

Sc=Sb+SL*Xi3;



Sd=Sc-(Tc-Td)/Y;



Strain=[0 Sb Sc3 Sd];
Stress=[0 Tb Tc Td];

plot(Strain,Stress)
axis([ 0 0.065 0 250])


I am trying to connect point Sb Tb &Sc Tc& Sd Td together as a line, but the problem is that value between location B to C changes

Matlab gives me an error of "Vectors must be the same lengths."

I think because I have T range from Tb to Tc (T=Tb:Tc) and this is the reason give me error. Is there anyway to fix it? I run fine without having T in the range, but as a solid number.

Thank you



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.