Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
I am getting error in this code?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
rajasekhar reddy ogirala
el 14 de Feb. de 2014
Cerrada: MATLAB Answer Bot
el 20 de Ag. de 2021
f=@(x)cos(x)/x q(x)=integral(f,0,10)
i am getting error in evaluating that statements in command window
sorry guys i am very new to MATLAB.
Thanks for ur help
0 comentarios
Respuestas (1)
Mischa Kim
el 14 de Feb. de 2014
Editada: Mischa Kim
el 14 de Feb. de 2014
Rajasekhar, use
f = @(x) cos(x)./x;
q = integral(f,0.1,10)
There is a problem though with f approaching inf as you approach x=0. So you can get close but not all the way.
2 comentarios
Roger Stafford
el 14 de Feb. de 2014
Actually that integral is divergent at the lower limit of zero. As the lower limit, a, approaches zero, the integral approaches plus infinity in a similar way to -log(a).
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!