Matlab solve nonlinear equations with parameters

i did solve nonlinear equations and plotting but i need to modify this program to solve nonlinear equations with parameter
i dont really have any idea how to do it , can anyone help me please?
code below is the code for solving nonlinear equations and plotting that i did.
vectorx=input('Please enter the range of x in the form of starting value:spacing value:end value');
vectory=Myfunction(vectorx);
plot(vectorx,vectory)
hold on
grid on
xguess=input('Please Give the answer a guess');
X0=fzero(@Myfunction,xguess);
X1=fzero(@Myfunction,-xguess);
y0=Myfunction(X0)
plot(X0,y0,'r+')
plot(X1,y0,'r+')

回答 (1 件)

Matt J
Matt J 2013 年 5 月 23 日

0 投票

This link talks about different ways to define functions with additional parameters

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

タグ

質問済み:

Hao
2013 年 5 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by