필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

"Which Sym" statement so the sym statement will work

조회 수: 1 (최근 30일)
Philosophaie
Philosophaie 2013년 6월 30일
마감: MATLAB Answer Bot 2021년 8월 20일
which sym
class(sym)
Gup=sym(zeros(2,2))
I put "which sym" before the sym statement and I still get this error"
??? Subscript indices must either be real positive integers or logicals.
Error in ==> CoAndContraMetricTensors at 7
Gup=sym(zeros(2,2))

답변 (2개)

Wayne King
Wayne King 2013년 6월 30일
The line:
Gup = sym(zeros(2,2));
works. Therefore the error must be coming from somewhere else in your CoAndContraMetricTensors.m file. You do know that sym() is a MATLAB function so are you also using it as a variable in the M-file?
You don't show us what which sym returns.

Walter Roberson
Walter Roberson 2013년 6월 30일
In your other Question, when I said to put in
which sym
class(sym)
it was a request for you to show us (the people trying to assist you) what those two lines output. The two lines are not intended to repair anything, they are intended to give us volunteers information to better understand your problem. You need to show us the output of those two lines.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by