필터 지우기
필터 지우기

Assistance with simple error

조회 수: 3 (최근 30일)
John
John 2012년 12월 10일
Hi,
I am copying the code below from this page, but it says error
"Undefined function 'a' for input arguments of type 'char'."
Could anybody tell me what is wrong?
Thanks
a := [6, 9, 17, 0, 13, 9, 9, 12, 12, 12]:
b := [7, 8, 20, 2, 11, 8, 9, 12, 13, 15, 2, 14]:
q := plot::QQplot(a, b):
plot(q)

채택된 답변

Walter Roberson
Walter Roberson 2012년 12월 10일
편집: Walter Roberson 2012년 12월 10일
Provided you have the symbolic toolkit, at the MATLAB command line use
a = [6, 9, 17, 0, 13, 9, 9, 12, 12, 12];
b = [7, 8, 20, 2, 11, 8, 9, 12, 13, 15, 2, 14];
feval(symengine, 'plot::QQplot', a, b);

추가 답변 (4개)

Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 10일
편집: Muruganandham Subramanian 2012년 12월 10일
Check this:
I don't have r2012b version
a = [6, 9, 17, 0, 13, 9, 9, 12, 12, 12];
b = [7, 8, 20, 2, 11, 8, 9, 12, 13, 15, 2, 14];
plot::QQplot([a, b]);
  댓글 수: 1
John
John 2012년 12월 10일
Thanks,
On the :: it is giving the Error: Unexpected MATLAB operator.
Any suggestions?

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


Wayne King
Wayne King 2012년 12월 10일
Are you trying to enter this directly at the MATLAB command prompt?
You have to first enter
>>mupad
Then copy and paste the code in the MuPAD notebook and hit enter
  댓글 수: 2
John
John 2012년 12월 10일
Thanks!
John
John 2012년 12월 10일
Could you tell me the correct syntax for the command line?
It doesn't seem to like the ::
a = [6, 9, 17, 0, 13, 9, 9, 12, 12, 12];
b = [7, 8, 20, 2, 11, 8, 9, 12, 13, 15, 2, 14];
plot::QQplot([a, b]);

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


Wayne King
Wayne King 2012년 12월 10일
Do you have the Statistics Toolbox? If so you don't need to use MuPAD
a = [6, 9, 17, 0, 13, 9, 9, 12, 12, 12];
b = [7, 8, 20, 2, 11, 8, 9, 12, 13, 15, 2, 14];
qqplot(a,b)
  댓글 수: 1
John
John 2012년 12월 10일
Thanks, I thought the qqplot at this link was for continuous variables
And the qqplot at this link was for discrete variables (that is what the documentation says).
They do not produce the same plots?
I need to use the discrete option.
Thank you

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


Sean de Wolski
Sean de Wolski 2012년 12월 10일
And in MuPAD, all you have to do is paste what you have above into a code line.

카테고리

Help CenterFile Exchange에서 Functional Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by