Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

how to solve Error using * ?

2 Ansichten (letzte 30 Tage)
thar
thar am 25 Apr. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 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.

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 25 Apr. 2014
Bearbeitet: Azzi Abdelmalek am 25 Apr. 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 Kommentare
thar
thar am 25 Apr. 2014
Bearbeitet: thar am 25 Apr. 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 am 25 Apr. 2014
Look at edited answer

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by