Check for missing argument or incorrect argument data type in call to function 'int'.

6 visualizaciones (últimos 30 días)
I want to write code for this integral function but there is an error
Check for incorrect argument data type or missing argument in call to function 'int'.
Error in nntraining3 (line 12)
P = int(f, x, 0, inf);
How can I improve it?
Pg = 0.198;
Pl = 0.818;
t = 1500;
y = Pg-Pl
f = abs(y);
P = int(f, t, 0, inf)
Can you check this code?

Respuestas (1)

Walter Roberson
Walter Roberson el 25 de Mayo de 2022
P = inf(size(f));
P(f==0) = 0;
You are integrating a vector of non-negative real constants from 0 to infinity. The integral of a positive constant to infinity is infinity. The integral of 0 to infinity is 0.
I have to wonder what anything in the first part of the code matters; you ignore all those variables.
I have to wonder if what you really want is trapz(f)
  4 comentarios
Walter Roberson
Walter Roberson el 25 de Mayo de 2022
Shallow Neural networks do not involve integration, they are transformation functions and matrix multiplication, done as many times as there are layers.
You could potentially want to model an infinite number of layers that were the same, and ask what the final value would be. I do not think that you would integrate for that: it would be more like calculating eigenvalues, doing calculations like infinite Markov chains.
Alexandr Lim
Alexandr Lim el 26 de Mayo de 2022
Thank you for your explaining.
Since I'm new to this, I think I need to explore this topic more.

Iniciar sesión para comentar.

Categorías

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

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by