Info

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

How to generate a loop for the problem mentioned in the context

1 Ansicht (letzte 30 Tage)
Alireza Babaei
Alireza Babaei am 10 Apr. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Dear, scholars,
Anybody can help me with writing a decent code for finding the below equation:
I can write the code for the second coefficient of numerator (I mean the following part):
But I can not extend it to the whole equation,
Any ideas?
I attach my code for the second part:
clc
clear all
close all
we = linspace(0,100,101);
gh = [1 3 5];
w = [21 39 88];
for i = 1:3
for j = 1:length(we)
a(i,j) = gh(i) * we(j);
C(i,j) = (1/12)+1i*we(j);
x(i,j) = 12*gh(i);
s3(i,j) = 1i*gh(i)*we(j);
s2(i,j) = w(i)^2 - we(j)^2+1i*w(i);
s1(i,j) = 1i*gh(i)*we(j);
v2(i,j) = s3(i,j)/s2(i,j)+C(i,j);
v1(i,j) = s1(i,j)/s2(i,j);
v(i,j) = abs(v1(i,j)/v2(i,j))
d = log10(sum(v))
d1 = sum(v);
end
end
figure
plot(we,d,'LineWidth',2)
grid on

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by