How to numerically solve and plot after solving the integration with a constant Multiplication
이전 댓글 표시

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
Jan
2022년 3월 20일
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.
채택된 답변
추가 답변 (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)
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
