more convenient way to present a result of a symbolic calculation

조회 수: 1 (최근 30일)
Eliraz Nahum
Eliraz Nahum 2018년 11월 4일
댓글: madhan ravi 2018년 11월 4일
hello everyone,
is there a more convenient/elegant way of presenting the result? I am adding the code:
clear all
close all
clc
syms t y(t) b m k w
dsolve(diff(y,t,2)+(k/m)*y==(1/m)*cos(w*t))
I am attaching a photo in which we can see the desirable way of presentation I am interested in.
thanks!

채택된 답변

madhan ravi
madhan ravi 2018년 11월 4일
편집: madhan ravi 2018년 11월 4일
Use
pretty(sol)
Or if you use live editor you can see the result like the one in your question
  댓글 수: 5

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

추가 답변 (1개)

Eliraz Nahum
Eliraz Nahum 2018년 11월 4일
for some reason I don't get the desired result. the result I got:
the right result (by wolfram):
any recommendations? maybe something in the syntax is wrong?

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by