Hello, does anyone know how I can change the symbolic output in Matlab so that matlab exactly matches my input? Currently, Matlab defines new "variables" to shorten the output.
I don't want the substitution

 채택된 답변

Sai Sri Pathuri
Sai Sri Pathuri 2020년 7월 8일

1 개 추천

You may use sympref function with 'AbbreviateOutput' parameter set to false to avoid the creation of new variables
sympref('AbbreviateOutput',false);
syms K EI l1
K1 = [12*EI/l1^3, 6*EI/l1^2, -12*EI/l1^3, 6*EI/l1^2;
6*EI/l1^2, 4*EI/l1, -6*EI/l1^2, 2*EI/l1;
-12*EI/l1^3, -6*EI/l1^2, 12*EI/l1^3, -6*EI/l1^2;
6*EI/l1^2, 2*EI/l1, -6*EI/l1^2, 4*EI/l1;]
Refer this documentation for more information

댓글 수: 1

madhan ravi
madhan ravi 2020년 7월 8일
It works but if the expression is really long it might not work.

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 5월 30일

댓글:

2020년 7월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by