I am trying to find answers to specific input (t=20)
But my code keeps out putting strange equations without all the variable
I'd appreciate it if anyone can show me why this output is like that
For example the first line below is part of the output I dont understand what the #X is
xSol(t) = (exp(root(#X^3 + (5*#X)/4 - 2^(1/2)/8, #X, 3)*t)*(2^(1/2)clc, clearsyms x(t) y(t) z(t)ode1 = diff(x,t) == z - (1/2)*y;ode2 = diff(y,t) == (1/2)*x - (1/(sqrt(2)))*z;ode3 = diff(z,t) == (1/(sqrt(2)))*y - (1/2)*x;odes = [ode1; ode2; ode3];cnd1 = x(0) == 1;cnd2 = y(0) == 0;cnd3 = z(0) == 0;conds = [cnd1; cnd2; cnd3];[xSol(t), ySol(t), zSol(t)] = dsolve(odes, conds)fplot(xSol)hold onfplot(ySol)hold onfplot(zSol)grid onlegend('xSol','ySol', 'zSol')
Best Answer