# 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

조회 수: 3(최근 30일)
Hagar Hendy 2022년 11월 21일
댓글: Walter Roberson 2022년 11월 21일
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
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

댓글을 달려면 로그인하십시오.

### 답변(1개)

the cyclist 2022년 11월 21일
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표시숨기기 없음
Walter Roberson 2022년 11월 21일
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.)

댓글을 달려면 로그인하십시오.

### 범주

Find more on Mathematics in Help Center and File Exchange

R2022b

### Community Treasure Hunt

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

Start Hunting!