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

6 vues (au cours des 30 derniers jours)
Alexandr Lim
Alexandr Lim le 25 Mai 2022
Commenté : Alexandr Lim le 26 Mai 2022
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?

Réponses (1)

Walter Roberson
Walter Roberson le 25 Mai 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 commentaires
Walter Roberson
Walter Roberson le 25 Mai 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 le 26 Mai 2022
Thank you for your explaining.
Since I'm new to this, I think I need to explore this topic more.

Connectez-vous pour commenter.

Catégories

En savoir plus sur R Language dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by