Matrix display answers without sigmas

조회 수: 49 (최근 30일)
Valter Silva Nava
Valter Silva Nava 2021년 4월 13일
댓글: Valter Silva Nava 2021년 4월 17일
Hello, I am working with matrices and need to monitoring in some steps the info of the matrix, but sometimes instead of having a complete answer, the Matlab shows them with sigmas, like variables. I want to know if there is a way to modify the Matlab to always get the complete info in the matrices, without the sigmas.
For example:
syms E E1 E2 E3;
E1 = -1; E2 = 1; E3 = 0;
N1 = ((E-E2)/(E1-E2))*((E-E3)/(E1-E3));
N2 = ((E-E1)/(E2-E1))*((E-E3)/(E2-E3));
N3 = ((E-E1)/(E3-E1))*((E-E2)/(E3-E2));
b= [diff(N1,E) diff(N2,E) diff(N3,E)];
k= b.* b.'
This is what Matlab shows me:
I want to see the matrix with all the correct info, not with sigma variables.
  댓글 수: 2
Anshika Chaurasia
Anshika Chaurasia 2021년 4월 16일
Hi,
Which MATLAB version you are using?
On running your given code on MATLAB R2021a, I got following output:
Valter Silva Nava
Valter Silva Nava 2021년 4월 16일
Hello, I am using the same version, MATLAB R2021a.

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

채택된 답변

G A
G A 2021년 4월 16일
편집: G A 2021년 4월 16일
You may be running your code in the live editor.
Running the code in a usual script or command window displays the result in the way you want.
Or
To display the results without being abbreviated, set 'AbbreviateOutput' preference to false.
  댓글 수: 1
Valter Silva Nava
Valter Silva Nava 2021년 4월 17일
Thank you for the answer.
sympref('AbbreviateOutput',false)
if you want to return to the original output display, then use sympref('default')

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by