필터 지우기
필터 지우기

how to create a symbolic variable without using syms?

조회 수: 2 (최근 30일)
Erwin Avendaño
Erwin Avendaño 2017년 11월 6일
댓글: Erwin Avendaño 2017년 11월 7일
what happens is that I create a code that uses Symbolic Math Toolbox but they tell me that in the compiler it does not accept it then I want to declare a symbolic variable without using syms
my code
function pushbutton3_Callback(~, ~, handles)
syms x %variable simbolica x
f=get(handles.edit8,'string');
xl=str2double(get(handles.edit3,'string'));
xu=str2double(get(handles.edit5,'string'));
tol=str2double(get(handles.edit4,'string'));
E=100;
xa=100;
i=0;
while(tol<E)
xr=(xl+xu)/2;
fxl=subs(f,x,xl);
fxr=subs(f,x,xr);
m=fxl*fxr;
if(m)<0
xu=xr;
else
xl=xr;
end
E=abs(xr-xa);
xa=xr;
i=i+1;
end
xr;
vpa(E,5)
set(handles.edit6,'string',xr);
set(handles.edit9,'string',E);
  댓글 수: 2
Karan Gill
Karan Gill 2017년 11월 6일
What is the error, output, line of error etc? We cannot help you without full details.
Erwin Avendaño
Erwin Avendaño 2017년 11월 7일
i can't use symbolic math toolbox because i will do executable with guide

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by