Azzera filtri
Azzera filtri

getting error as Matrix dimensions must agree.

1 visualizzazione (ultimi 30 giorni)
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
Ameer Hamza il 16 Mag 2020
Can you show your integral equation in MATLAB form? You can attach it as an image.
nikhil
nikhil il 16 Mag 2020
Sir, i consider only integral part of equation

Accedi per commentare.

Risposta accettata

Walter Roberson
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)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by