Borrar filtros
Borrar filtros

integration error in matlab

1 visualización (últimos 30 días)
nikhil
nikhil el 11 de Mayo de 2020
Comentada: nikhil el 11 de Mayo de 2020
Hi all,
i am trying to solve the above equation in matlab, but i am getting an error as Error in integralCalc while solving the code
any suggestions and thanks in advance
clc;
clear;
ro = 17.5; R = 65;
a1 = 1/2*((((1+4*(ro.^2))/(1-(ro.^2))).^(1/2)) -1);
a2 = -1/2*((((1+4*(ro.^2))/(1-(ro.^2))).^(1/2)) -1);
% let X0<x<1.22*X0 replace X0 with ro and 1.22*X0 as b
b = 1.22*ro;
% first condition R (main radius = 65) R>r>b
x = b:5:R;
y = ro:0.45:b;
func1 = @(x)((-x.^3)/((1-x.^2).*((x.^2)-a1).*((x.^2)-a2)).^(1/2));
i = zeros(size(x));
for c = 1:length(x)
i(c) = integral(func1,0,x(c));
end
func2 = @(y)((-y.^3)/((1-y.^2).*((y.^2)-a1).*((y.^2)-a2)).^(1/2));
i = zeros(size(y));
for c = 1:length(y)
i(c) = integral(func1,0,y(c));
end

Respuesta aceptada

Walter Roberson
Walter Roberson el 11 de Mayo de 2020
Always use ./ instead of / unless you intend to do algebraic matrix division similar to A/B meaning A matrix-multiply pinv(B)
  1 comentario
nikhil
nikhil el 11 de Mayo de 2020
thanks for the suggestion

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by