I have an error on the following code.how to rectify the error ?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
PLACEIUS NISHIGA G
le 22 Jan 2018
Commenté : PLACEIUS NISHIGA G
le 22 Jan 2018
if true
clc;
clear all;
close all;
c = Ns;
d= 8;
z = f(c, d)
function z = f(c,d)
if ~mod(c,d)
z=0
else
z=d-mod(c,d);
end
end
end
0 commentaires
Réponse acceptée
KSSV
le 22 Jan 2018
function z = myfunction(Ns)
c = Ns;
d= 8;
z = f(c, d)
end
function z = f(c,d)
if ~mod(c,d)
z=0
else
z=d-mod(c,d);
end
end
Call the function:
Ns = rand ; % any value
z = myfunction(Ns) ;
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!