Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Calculating double integral

Subject: Calculating double integral

From: Haojie

Date: 2 Apr, 2012 19:13:12

Message: 1 of 1

Hi all,

I want to calculate a double integral

int(200*(0.4*U/log(y/10))^2*y/U/(1+50*x*y/U)^(5/3), x from 0 to H, y from U/l to 10000)
U and l are constant,
H is the input of the function
And here is what i wrote in the mfunction

function d=SpectrumV(H)
d=dblquad (@int,0,H,U/l,10000);
function s = int(x,y)
 s = 200*(0.4*U/log(y/10))^2*y/U/(1+50*x*y/U)^(5/3);

but when I try to use it, matlab will say

??? Error using ==> mldivide
Matrix dimensions must agree.

I really appreiciate if you can help.
 I am quite new to matlab so there might be some really stupid mistakes inside.......

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us