Can anyone suggest how to change the display allignment in command prompt for seeing list of equations

조회 수: 2 (최근 30일)
These symbolic equations are right alligned, can we change to left allignment
  댓글 수: 3
surya chandra gulipalli
surya chandra gulipalli 2021년 1월 14일
Thank you for your reply,
Its the result of my program on symbolic variables. 'eqn' stores list of equations. when I want to see in command window, typing 'eqn' displays with right allignment. So I need to scroll command window to right side everytime. This was bit annoying
dpb
dpb 2021년 1월 14일
What happens if you try to cast eqn to string() or cellstr()? If can do that, then you can display the text however you wanted.

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

답변 (1개)

Walter Roberson
Walter Roberson 2021년 1월 14일
syms x
eq(1,1) = expand((x-1)^2);
eq(2,1) = expand((x-1)^10);
eq
eq = 
char(eq)
ans = '[x^2 - 2*x + 1; 45*x^2 - 10*x - 120*x^3 + 210*x^4 - 252*x^5 + 210*x^6 - 120*x^7 + 45*x^8 - 10*x^9 + x^10 + 1]'
arrayfun(@disp, eq)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by