Problem with the function fnzeros

Hi I'm a new Matlab user and I have some difficulties with the function fnzeros. I've create a function called Temp
function y = Temp (x,m2,t2,p2,cp,Rd)
y = 1.61*m2*p2*(x/t2).^(cp/Rd)-611*.10^(7.5*(t2-273.15)/(t2-35.85));
end
but when i try to run the command
z = fnzeros (Temp)
to find the solution of the equation y=0 i have this message of error:
Error using fnbrk (line 127)
Input is of unknown (function) form.
Error in fnzeros (line 69)
if fnbrk(f,'var')>1
Can someone explain me why? Thank you very much

回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 9 月 15 日

0 投票

You need to pass a spline to fnzeros. Instead you are passing the result of executing the function Temp with no inputs. Notice that the examples in the documentation involve calling spmak()

1 件のコメント

Gianluca lubelli
Gianluca lubelli 2013 年 9 月 15 日
so how can i modify the code to find that solution? How can i make a spline of that function? Sorry I'm really new on this software, I have a lot of things to learn :-)

サインインしてコメントする。

Gianluca lubelli
Gianluca lubelli 2013 年 9 月 15 日

0 投票

so how can i modify the code to find that solution? How can i make a spline of that function? Sorry I'm really new on this software, I have a lot of things to learn :-)

カテゴリ

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

タグ

質問済み:

2013 年 9 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by