getting error as Matrix dimensions must agree.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi all,
i am trying to solve the above equation in matlab, but i am getting an error as matrix dimensions must agree while solving the code
any suggestions and thanks in advance
clc;
clear;
format short;
ro = 17.5; % op.ra
R = 65; b= 1.225*ro; % radius of cylinder
r = b:5:R; % let us divdie r values into two section upto b point
ro_bar= ro/R; %dimensionless variable
x1 = r/R; % set of point from radius and b point
b1 = ro:0.45:b;
r_b1 = b1/R; % set of points from b point to op.ra
alp= asind(ro/R);
% let us make two divisions
func1 = @(r)((r.^3)./(sqrt((x1).^2) - ((ro_bar).^2) - (((x1).^6).*(1-((ro_bar).^2)))));
i = zeros(size(x1));
for c = 1:length(x1)
i(c) = integral(func1,0,x1(c));
end
2 Commenti
Ameer Hamza
il 16 Mag 2020
Can you show your integral equation in MATLAB form? You can attach it as an image.
Risposta accettata
Walter Roberson
il 16 Mag 2020
ro = 17.5; % op.ra
R = 65; b= 1.225*ro; % radius of cylinder
r = b:5:R; % let us divdie r values into two section upto b point
ro_bar= ro/R; %dimensionless variable
x1 = r/R; % set of point from radius and b point
b1 = ro:0.45:b;
r_b1 = b1/R; % set of points from b point to op.ra
alp= asind(ro/R);
i = zeros(size(x1));
for c = 1:numel(x1)
func1 = @(r)((r.^3)./(sqrt((x1(c)).^2) - ((ro_bar).^2) - (((x1(c)).^6).*(1-((ro_bar).^2)))));
i(c) = integral(func1,0,x1(c));
end
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!