here's my code and the response
testvec = [Xc,Yc,sig,A]
ErrTest1 = RMS_Err_func(Image,Xc,Yc,sig,A)
ErrTest2 = RMS_Err_func(Image,testvec)
gives:
ErrTest1 =
0.0942
Not enough input arguments.
Error in NM_2D_Gauss_fit>RMS_Err_func (line 60)
r(l,m) = sqrt((l-Xc).^2+(m-Yc).^2);
Error in NM_2D_Gauss_fit (line 46)
ErrTest2 = RMS_Err_func(Image,testvec)

댓글 수: 3

Walter Roberson
Walter Roberson 2018년 2월 13일
NM_2D_Gauss_fit and RMS_Err_func appear to be your own code.
In your first call you are passing in four inputs to RMS_Err_func. In the second call you are only passing in two inputs. We can only guess that RMS_Err_func needs more than 2 inputs.
Derrick Salmon
Derrick Salmon 2018년 2월 13일
Walter
Is there no way for the function so see the contents of testvec?
Walter Roberson
Walter Roberson 2018년 2월 13일
... Yes?
You are passing it in to the function, so the second argument can examine the contents of testvec.

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2018년 2월 13일

0 개 추천

I suspect that your testvec is a vector that has within it values for Xc, Yc, sig, A . If so then,
temp = num2cell(testvec);
ErrTest2 = RMS_Err_funct(Image, temp{:});

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2018년 2월 13일

댓글:

2018년 2월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by