i have an error using plot function with syms engine

조회 수: 1 (최근 30일)
arvind thakur
arvind thakur 2021년 9월 20일
댓글: arvind thakur 2021년 9월 20일
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

답변 (1개)

KSSV
KSSV 2021년 9월 20일
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)) ;
  댓글 수: 1
arvind thakur
arvind thakur 2021년 9월 20일
It's again showing same error , could you plz revise and paste the above code sir, I am very new on matlab

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by