How to numerically solve and plot after solving the integration with a constant Multiplication
Mostrar comentarios más antiguos

clc
clear all
close all
B=51;
C=10;
t=0:.01:1;
K= @(t) (((sin(t)-(t.*cos(t))).^(1/2)).*((sin(t)+(51.*sin(10.*t)))));
H1=(1/pi).*(S0/lam_d)^2;
plot(k,t)
1 comentario
Jan
el 20 de Mzo. de 2022
Please note that clear all deletes all loaded functions from the memory. This has no advantage, but reloading them from the slow disk wastes a lot of time. Waht a pity that many teachers suggest this brute clearing header.
Respuesta aceptada
Más respuestas (1)
B = 51;
C = 10;
S0 = ...;
lam_d = ...;
H1 = (1/pi)*(S0./lam_d).^2;
K= @(t) (sin(t)-t.*cos(t)).^(1/2).*(sin(t)+ 51*sin(10*t));
U = 0:0.01:1;
S = zeros(numel(U),1);
S(1) = 0.0;
for i = 2:numel(U)
S(i) = integral(K,U(i-1),U(i)) + S(i-1);
end
S = S*H1;
plot(U,S)
Categorías
Más información sobre Solver Outputs and Iterative Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
