Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I followed the instructions for Interactive Fitting (http://www.mathworks.com/help/matlab/data_analysis/interactive-fitting.html#bswij4t) the generated function will not accept variables of types double or single - why?
조회 수: 1 (최근 30일)
이전 댓글 표시
I am using data that is generated from measurements of pupil diameter vs. light levels. The step that generates a .m file for the function works fine and I renamed the function but when i enter the X1 and Y1 vectors and attempt to run the function I get the following error for either single or double type data variables. What type should be used?
Undefined function 'LDvslnlux' for input arguments of type 'single'.
댓글 수: 2
Walter Roberson
2016년 6월 30일
The link appears to be http://www.mathworks.com/help/matlab/data_analysis/interactive-fitting.html#bswij4t
답변 (2개)
Tien Tran
2016년 7월 1일
Hi Linda When you generate a code file, you can use as following: We have a function Linda(X1, Y1, valuesToEvaluate1), so, you can write Linda(x,y,10) on the Command Window with x, y are new data and having the same size, 10 is an x-value for a marker. The new plot matches the appearance of the figure from which you generated code except for the y data values
댓글 수: 2
Walter Roberson
2016년 7월 1일
is not the name of any Mathworks provided function, and it is not part of the File Exchange either. It does not seem to be anywhere else on the Internet.
You mentioned renaming a function. If you renamed it to LDvslnlux then make sure your file begins
function LDvslnlux
(possibly with some parameters)
and make sure that it is stored in LDvslnlux.m . Watch out, for example, for 1 (the digit) comared to l (lower-case L) and note that if your named your file ldvslnlux.m instead then the file would not be considered to match the function name LDvslnlux
댓글 수: 1
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!