Loop is not running in Matlab
Mostrar comentarios más antiguos
I`m trying to update the variables inside the loop .
I`m sypposed to get a plot where stress and strain respectively as x and y coordinates.Unfortunately i got nothing at all.
Please help.
clc;clear;
%disp('................................Concrete properties');
Fcu=0.3; %input('Ultimate compressive strength(t/cm2)');
Ec=240.9; % Modulus of Elasticity
u=0; % Strain at oroginal point
s=0; %Stress aat original point
uy=-Fcu/Ec; % uy is the concrete strain corresponding to ultimate stress.
%number of steps for strain increment=150
%%%%%%%%%%%% Elastic Branch %%%%%%%%%%%%%%%%%%%
for i=0.0015:-0.0015:0.00001; %deltau is strian increment
if deltau(i)<0 && deltau(i)<uy
factor=(-uy-u(i))/deltau(i);
if factor>1.0 %Elastic Branch
E(i)=Ec;
u(i)=u(i)+deltau(i);
s(i)=s(i)+deltau(i)*Ec;
end
Array=[u(i),s(i)]
plot(u(i),s(i))
hold on
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Stress and Strain en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
