i want to multiply input * gex , where input is (60000 *784) and gex is (784 *1000), but when i multiply that i get this error message Error using input Not enough input a
1 view (last 30 days)
Show older comments
i want to multiply input * gex , where input is (60000 *784) and gex is (784 *1000), but when i multiply that i get this error message
Error using input
Not enough input arguments.
code :
ThemeCopy
load('w.mat')
Rmin = 1e5
Rmax = 1e6
Gmin = 1.0/Rmax
Gmax = 1.0/Rmin
gex = zeros(size(y));
gin = zeros(size(y));
y=w{1}
for i = 1:numel(y) % numel(y), not length(y)
if y(i)>=0
gex(i) = Gmax*y(i) +Gmin*(1-y(i));
gin(i) = Gmin;
else
gex(i) = Gmin;
gin(i) = -Gmax*y(i) +Gmin*(1+y(i));
end
end
tex = input * gex
0 Comments
Answers (1)
the cyclist
on 21 Nov 2022
The main problem here seems to be that input is a built-in MATLAB function, and your code is trying to call it (and doesn't have enough inputs).
Try renaming your variable to something that is not a MATLAB function name.
1 Comment
Walter Roberson
on 21 Nov 2022
Ah yes. If you have a variable named input in the .mat file, then MATLAB might not notice that it had been created and might assume that input is still a function later.
That should not, in theory, happen inside a script that is being executed from the top level, but it will happen these days if this is inside a function. If you "poof" a variable into existance by using load without any output assignment, then variable names that happen to match the names of functions might be treated as the function by MATLAB (at least inside functions.)
See Also
Categories
Find more on Time Series Events in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!