Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Forming function handles in matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want to form array of function handles first.
After that i need to form 20*20 matrix by involving integration of these function handles.
I provided my script below, iam facing the below error.
Ginvi = @(phi)zeros(size(phi));
for i=2:10
Ginvi = @(phi)Ginvi(phi)+3.56*cos(2*i*(phi-1.5));
end
nr = cell(1, 20);
wr = cell(1, 20);
for j = 1:4
for n = (((j-1)*5)+2):(j*5)
nr{n} = @(phi)50*cos(phi+n*2)+32*2/3;
wr{n} = @(phi)50*cos(phi+n*2);
end
end
for n = 1:5:20
nr{n} = @(phi)60*cos(phi-3.56+(n-1)*5)+32*2/3;
wr{n} = @(phi)60*cos(phi-3.56+(n-1)*5);
end
nr
lrr = ones(20, 20);
for i = 1:20
for j = 1:20
lrr(i, j) = 55*integral(@(phi)(nr{i}*wr{j}*Ginvi(phi)), 0, 2*pi);
end
end
lrr
0 comentarios
Respuestas (0)
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!