Help me, Error using inline (line 51) Input must be a character vector.

조회 수: 1 (최근 30일)
Muhammad Lazuardi Afnan Ghifari
Muhammad Lazuardi Afnan Ghifari 2019년 6월 25일
댓글: Walter Roberson 2019년 6월 27일
q=get(handles.fo,'string');
syms x;
f=inline(q);
w=diff(f(x));
f2=inline(w);
xo=str2num(get(handles.xo,'string'));
x=xo
for i=0:1000
y=x
x=y-(f(x)/f2(x));
if x==y
break
end
end
x=num2str(x);
i=num2str(i);
set(handles.rootout,'string',x)
set(handles.iterout,'string',i)
  댓글 수: 4
Muhammad Lazuardi Afnan Ghifari
Muhammad Lazuardi Afnan Ghifari 2019년 6월 27일
편집: Muhammad Lazuardi Afnan Ghifari 2019년 6월 27일
Thank you for your answer sir, actually im not fully understand with that. Is that mean i can't use funtion inline anymore? I have task to make a GUI using matlab and the funtion is x.^2+10*cos(x), it work perfectly when im not use the GUI math script but it keep error when i want to make GUI
Walter Roberson
Walter Roberson 2019년 6월 27일
Unless you are using MATLAB 4.2 or earlier, you should not use inline()

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by