While Generating Elements While Creating a Matrix, the following happened.....

조회 수: 3 (최근 30일)
Sukhmeet
Sukhmeet 2011년 6월 22일
While Generating Elements While Creating a Matrix, the following happened.....
>> A = sym('A', [2 4]) ??? Error using ==> error Formatted arguments cannot be non-scalar numeric matrices.
Error in ==> sym.sym at 100 error('symbolic:sym:sym:errmsg4','Second argument %s not recognized.',a);
Help required...

답변 (2개)

Walter Roberson
Walter Roberson 2011년 6월 22일
Which MATLAB version are you using? The ability to specify a size matrix in sym() is quite new, R2010b I think it is; with older MATLAB releases the error message for trying it might be strange.
  댓글 수: 2
Sukhmeet
Sukhmeet 2011년 6월 22일
7.0.0.19920(R14)
is there any other method to do the same....
Walter Roberson
Walter Roberson 2011년 6월 22일
That version is definitely too early to create a symbolic matrix using that syntax.
Sean's answer is good if you want to create A as an array initialized to particular values. If you want to create an array of symbols, there are ways involving loops or expressions with meshgrid()

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


Sean de Wolski
Sean de Wolski 2011년 6월 22일
A = sym(zeros(2,4)) %?

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by