more convenient way to present a result of a symbolic calculation

6 visualizaciones (últimos 30 días)
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!

Respuesta aceptada

madhan ravi
madhan ravi el 4 de Nov. de 2018
Editada: madhan ravi el 4 de Nov. de 2018
Use
pretty(sol)
Or if you use live editor you can see the result like the one in your question
  5 comentarios

Iniciar sesión para comentar.

Más respuestas (1)

Eliraz Nahum
Eliraz Nahum el 4 de Nov. de 2018
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?

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by