trying to use syms and i typed in syms('y') says error

조회 수: 4 (최근 30일)
Bastian
Bastian 2023년 12월 12일
댓글: Dyuman Joshi 2023년 12월 12일
y = syms('y')
Error using syms
Using input and output arguments simultaneously is not supported.

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 12월 12일
편집: Dyuman Joshi 2023년 12월 12일
If you are using syms, the syntax to define a variable is -
syms y
whos
Name Size Bytes Class Attributes cmdout 1x33 66 char y 1x1 8 sym
The sytanx you were using is for a different function called sym -
%Clear the initial variable
clear y
whos
Name Size Bytes Class Attributes cmdout 1x33 66 char
%Define via sym()
y = sym('y');
whos
Name Size Bytes Class Attributes cmdout 1x33 66 char y 1x1 8 sym
As you can see, the result of both is the same. Choose the function and the corresponding syntax you like.
  댓글 수: 6
Bastian
Bastian 2023년 12월 12일
ah ok thank you very much sorry just didnt read properly
Dyuman Joshi
Dyuman Joshi 2023년 12월 12일
You're welcome.
No need to be sorry, it is kinda confusing initially.
If my answer solved your problem, please consider accept it.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by