why the syms command is not working on my matlab ?

조회 수: 6 (최근 30일)
Stany Natalia
Stany Natalia 2017년 9월 11일
이동: Walter Roberson 2025년 11월 16일
Error using sym Error: File: sym.m Line: 176 Column: 35 Unexpected MATLAB expression.
Error in syms (line 77) toDefine = sym(zeros(1, 0));
Error in metnum1a (line 1) syms x
my syms used to work fine, but recently this error always come out and i don't know how to fix it. any suggestion ? Thanks a lot :)
  댓글 수: 2
DAGGUMALLI
DAGGUMALLI 2025년 11월 16일
이동: Walter Roberson 2025년 11월 16일
syms error in my matlab
idris
idris 2025년 11월 16일
이동: Walter Roberson 2025년 11월 16일
Could you rephrase your question @Stany Natalia?

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

답변 (1개)

Steven Lord
Steven Lord 2017년 9월 11일
Make sure you are using the sym function from Symbolic Math Toolbox, not another function named sym that you wrote or downloaded from somewhere else.
which -all sym
After that, if you are using the function from the toolbox check that you haven't accidentally modified the sym function from the toolbox. Edit it and see if there is a red square in the upper-right corner of the Editor box. If there is look for a red line in the gutter below that square and see if there is one on or near line 176. If so correct the problem it describes.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by