Not enough input arguments

8 次查看(过去 30 天)
Reham Sayed
Reham Sayed 2018-12-12
评论: Reham Sayed 2018-12-12
Hey guys I have a problem here
recently when I use almost any function I get this message 'Not enough input arguments'
for ex,
clc;
clear;
V=randi([-10,10],1,5);
disp('The vector is: num2str(V)');
sub=V-3;
disp(sub);
pos=(V>0);
Numpos=sum(pos);
disp(Numpos);
abs(V);
disp(abs);
max(V);
disp(max);
I wrote this simple code and I got error in abs because there is not enough arguments.
  2 个评论
Reham Sayed
Reham Sayed 2018-12-12
someone help me please I have a final exam after 6 hours.
Reham Sayed
Reham Sayed 2018-12-12
Thanks guys
It seems like I need coffeee :'D

请先登录,再进行评论。

回答(2 个)

per isakson
per isakson 2018-12-12
abs and max are Matlab functions, which requires input. Thus
disp(abs)
disp(max)
are wrong. What did you intend?

madhan ravi
madhan ravi 2018-12-12
disp(abs(V)) %change your lines to this
disp(max(V))

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by