Error using plot Conversion to double from sym is not possible. Error in MAE315_Intro_Project (line 66) plot(epsilon,sigma,Repsilon,Rsigma,'o').
Show older comments
Does anybody know why I am getting those errors? I cannot figure it out at all. Any help would be greatly appreciated. Thanks! See below for my code.
clear all; close all; clc;
load data
syms F t w
% Uncertainties
u_F = F .* 0.01
u_m = 0.001/2
% Equations for Uncertainty
A = t.*w; % Area
sigma = F./A % Stress
% Uncertainty
u_sigma = sqrt((diff(sigma,F).*u_F).^2 + (diff(sigma,t).*u_m).^2 +...
(diff(sigma,w).*u_m).^2)
% Givens
D = Dat(1:1953,1);
F = Dat(1:1953,2);
t = 0.094; % Thickness, inches
w = 0.370; % Width, inches
l = 6.500; % Length, inches
L = l + D; % Displaced Length
epsilon = (L - l)./l %Strain
sigma = subs(sigma)
u_sigma = subs(u_sigma)
% Plot Stress vs Strain
figure (1)
plot(epsilon, sigma)
xlabel('Strain')
ylabel('Stress')
title('Stress vs Strain')
% Ultimate Stress
Usigma = max(sigma)
% Ultimate Strain
index = find(sigma==Usigma)
Uepsilon = epsilon(index)
% Plot Ultimate Stress and Strain
figure (2)
plot(epsilon,sigma,epsilon(index),Usigma,'o')
xlabel('Strain')
ylabel('Stress')
title('Ultimate Stress & Ultimate Stress Point')
% Rupture Stress
Fm = Dat(1953:1953,2); % Max Force
Rsigma = Fm./A
% Rupture Strain
Dm = Dat(1953:1953,1); % Max Displacement
Lm = l + Dm; % Max New Length after Max Displacement
Repsilon = (Lm - l)./l
% Plot Rupture Stress and Strain
figure (3)
plot(epsilon,sigma,Repsilon,Rsigma,'o')
xlabel('Strain')
ylabel('Stress')
title('Rupture Stress & Rupture Stress Point')
Accepted Answer
More Answers (0)
Categories
Find more on Structural Mechanics 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!