how to create or save new workshop file every time finished a loop so that i can do a graph that has multiple line. if not the value will be keep overwritten. Need help to create new workshop file within the loop.

clc
m=100;
c=1.7;
s=7;
xcm=0.5*c;
xf=0.5*c;
e=xf/c-0.25;
Kk=1.2277e7*2*pi;
Kt=7.2758e5*2*pi;
rhow=1.225;
Mt=-1.2;
Ik=m*s^3*c/3;
Ikt=m*s^2/2*(c^2/2-c*xf);
It=m*s*(c^3/3-c^2*xf+c*xf^2);
aw=2*pi %assume
i=1
for Kk=1.2277e4:1e1:1.2277e7;
% j=1
% for V=0:1:200
% %preparing matrix for eig solution
% I=eye(2);
% Va(i)=V;
% MA=[Ik Ikt;Ikt It];
% MCE=[rhow*V^2*[0 c*s^2*aw/4;0 -e*c^2*s*aw/2]+[Kk 0;0 Kt]];
% MBD=[rhow*V*[c*s^3*aw/6 0;-e*c^2*s^2*aw/4 -c^3*s*Mt/8]];
% Q=[zeros(2) I;-inv(MA)*MCE -inv(MA)*MBD]
%
% %find lamdar by using eigensolution
% lamdar=eig(Q)
%
% for j=1:4
% im=imag(lamdar(j)); %separating real and imaginary
% re=real(lamdar(j));
% ome=sqrt(im^2+re^2);
% f(j,i)=ome/(2*pi);
% zeta(j,i)=-re/ome; %damping ratio
% end
%
% i=i+1;
% end
%
% end
%my problem is i want to create graph V vs f but with multiple line of f which represent every time of each loop

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 30 Nov 2013

Community Treasure Hunt

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

Start Hunting!