필터 지우기
필터 지우기

How to write the below code in matlab as itis asking the value of x?

조회 수: 2 (최근 30일)
ARTI
ARTI 2014년 1월 5일
편집: Image Analyst 2014년 1월 5일
NSD(x)=NSD(p)*exp(-x^2/2*lateralstraggle^2)
Error shown is : Undefined function or variable 'p'.

답변 (1개)

Image Analyst
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
ARTI
ARTI 2014년 1월 5일
so we need to declare the value of p. but the value of Nsd(p)=1*10^20 again it is showing error
Image Analyst
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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by