Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how to solve Error using * ?

1 visualización (últimos 30 días)
thar
thar el 25 de Abr. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
how to solve this problem?
>> syms x
>> y = 0.0002*exp(-2.3077*x).*cos(7.0753*x)+0.0612*exp(-2.3077*x).*sin(7.0753*x)-0.0502*cos(0.35493*x)+.483;
>> diff(y,x,2)
ans =
(316198015299*cos((35493*x)/100000))/50000000000000 - (250931707863*cos((70753*x)/10000)*exp(-(23077*x)/10000))/125000000000 - (682803412259*sin((70753*x)/10000)*exp(-(23077*x)/10000))/250000000000
>> x = [0:0.0001:5];
>> p = (316198015299*cos((35493*x)/100000))/50000000000000 - (250931707863*cos((70753*x)/10000)*exp(-(23077*x)/10000))/125000000000 - (682803412259*sin((70753*x)/10000)*exp(-(23077*x)/10000))/250000000000;
Error using *
Inner matrix dimensions must agree.

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 25 de Abr. de 2014
Editada: Azzi Abdelmalek el 25 de Abr. de 2014
syms x
p = (316198015299*cos((35493*x)/100000))/50000000000000 - (250931707863*cos((70753*x)/10000)*exp(-(23077*x)/10000))/125000000000 - (682803412259*sin((70753*x)/10000)*exp(-(23077*x)/10000))/250000000000;
z=0:0.1:5
out=double(subs(p,z))
plot(z,out)
  2 comentarios
thar
thar el 25 de Abr. de 2014
Editada: thar el 25 de Abr. de 2014
I'm tying to use this code to plot the graph
>> x = [0:0.0001:5];
>> p = -40327871461/7812500000*exp(-23077/10000*x).*cos(70753/10000*x)+210444021533/125000000000*exp(-23077/10000*x).*sin(70753/10000*x)+3094107371/500000000000*cos(3511/10000*x);
>> plot(x,p)
>> grid
so that i want to assign values for p
Azzi Abdelmalek
Azzi Abdelmalek el 25 de Abr. de 2014
Look at edited answer

La pregunta está cerrada.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by