Error: not enough input arguments

indienne -  
 indienne -
help , I'm very new to MATLAB!! I am trying to run this code, however, i get error, that there is error in line 3: not enough input arguments :(

function a = satur(u)

if abs(u)> 0.001
a= sign(u);
else
a= u*1000;
end
end
A voir également:
  • Not enough input arguments. matlab
  • Network error - <a href="https://forums.commentcamarche.net/forum/reseaux-sociaux-10">Forum Réseaux sociaux</a>
  • Fan error lenovo - <a href="https://forums.commentcamarche.net/forum/refroidissement-237">Forum Refroidissement</a>
  • A javascript error occurred in the main process - <a href="https://forums.commentcamarche.net/forum/materiel-systeme-2">Forum Matériel & Système</a>
  • Network error iptv - <a href="https://forums.commentcamarche.net/forum/reseaux-sociaux-10">Forum Réseaux sociaux</a>
  • LENOVO fan error au démarrage - <a href="https://forums.commentcamarche.net/forum/refroidissement-237">Forum Refroidissement</a>

1 réponse

makitoch Messages postés 789 Statut Membre 94
 
try like that :

if abs(u)> 0.001
function a = satur(u)
a= sign(u);
end
else
function a = satur(u)
a= u*1000;
end
0
indienne
 
Error: File: Untitledsaturforum.m Line: 2 Column: 1
Function definitions are not permitted in this context.
0