MATLAB: How to view struct with fields

ordinary differential equations

syms x(t) y(t) v(t) m c g s=symengine disp ('1)——————————————') cond1=x(0)==0; cond2=diff(x,t)==0; conds=[cond1 cond2] dx=diff(x,t); dx2=diff(x,t,2); dv=diff(v,t); dx2=diff(x,t,2); ode=m*diff(v,t)+c*v==m*g
Sol=solve(ode,conds,dx,x)

Best Answer

You can access the fields of a struct using dot notation. For example
Sol.c
Sol.g
Also, since you are trying to solve a differential equation, use dsolve(),
Sol=dsolve(ode,conds)