How to write the below code in matlab as itis asking the value of x?
2 ビュー (過去 30 日間)
古いコメントを表示
NSD(x)=NSD(p)*exp(-x^2/2*lateralstraggle^2)
Error shown is : Undefined function or variable 'p'.
0 件のコメント
回答 (1 件)
Image Analyst
2014 年 1 月 5 日
What do you think p should be? And what is x? MATLAB is not going to know unless you tell it. What if MATLAB just arbitrarily assumed 42 for p when you were thinking it should be 73 but you didn't tell MATLAB that? Would you like it to pick some value for p that you don't like?
2 件のコメント
Image Analyst
2014 年 1 月 5 日
編集済み: Image Analyst
2014 年 1 月 5 日
This works perfectly fine. I know because I just tried it:
p=42; % Declare p to be some value.
Nsd(p)=1*10^20
You forgot to post your error. And you forgot to tell me what value x has.
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!