i have an error using plot function with syms engine
1 view (last 30 days)
Show older comments
I have an error like below,
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.
Error in pressuremodel (line 36)
plot(a,K1,'.-b');
my code is:
%% pressure at crack wake due to bridgindg after application of remote stress
clc
close all
clear
a=0.001:0.0002:0.0018;
syms x a w
%x=1.0:0.1:1.98;
Ef=427000*10^6; % in Pa
Em=89000*10^6;
Ec=184000*10^6;
%mu=0.2825;
%v=0.36;
ao=0.001;
w=0.00512;
%R=.0725;
S=198*10^6;
%tow=20;
m1=0.6147+17.1844*(a.^2./w^2)+8.7822*(a.^6./w^6);
m2=0.2502+3.2889*(a.^2./w^2)+70.0444*(a.^6./w^6);
H=(1+m1*((a-x)./a)+m2*((a-x)./a).^2);
c=S*((w./(w-ao))+6*w*ao*((0.5*(w-ao)-(x-ao))./(w-ao)^3));
j=int((S*H)./(sqrt(a-x)), [0 ao]);
L=int(((S-c)*H)./(sqrt(a-x)), [ao a]);
K=sqrt(2/3.14)*(j+L);
K1=((K*(Em./(Ec)))./10^7);
plot(a,K1,'.-b');
help can appreciated in advance
0 Comments
Answers (1)
KSSV
on 20 Sep 2021
You need to substitue the value of a into K1 using the function subs, convers the output into double and then plot.
y = double(subs(K1,1)) ;
See Also
Categories
Find more on Line Plots 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!