How to write the below code in matlab as itis asking the value of x?
Show older comments
NSD(x)=NSD(p)*exp(-x^2/2*lateralstraggle^2)
Error shown is : Undefined function or variable 'p'.
Answers (1)
Image Analyst
on 5 Jan 2014
0 votes
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 Comments
ARTI
on 5 Jan 2014
Image Analyst
on 5 Jan 2014
Edited: Image Analyst
on 5 Jan 2014
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.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!