Why I'm getting error (too many arguments) in my integral

4 views (last 30 days)
Lucia Navarro
Lucia Navarro on 14 May 2022
Edited: John D'Errico on 14 May 2022
I'm trying to do a double integral with comand int but it appears an error to me that says too many arguments. What's wrong in my code?
%Hallando el flujo electrico parte delantera
%Hallando el flujo electrico parte trasera
%Hallando el flujo electrico parte derecha
%Hallando el flujo electrico parte izquierda
%Hallando el flujo electrico parte superior
%Hallando el flujo electrico parte inferior
  1 Comment
Torsten on 14 May 2022
The maximum number of arguments for "int" is 4. Your outer "int" always has 5.

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 14 May 2022
Edited: John D'Errico on 14 May 2022
You need to pay MUCH more attention to your code.
For example, just a quick look shows this:
Look inside:
That is the inner call to int. It is fine. But then what do you do? We see:
What is that spare 4*x*y? If you wanted to multiply by that expression, you need a * operator. So that line has invalid syntax.
How about this one?
In there, we see the outer call to int has 5 (FIVE) arguments. But int requires 4 arguments. So what is that spare 4*y doing in there?
In fact, in every case, the outer call to int has 5 input arguments.
Now go back and carefully read the error message. Did it say, TOO MANY ARGUMENTS? Look at your code. Read the error messages. They are there to guide you, not to just take up space.




Community Treasure Hunt

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

Start Hunting!

Translated by