Effacer les filtres
Effacer les filtres

Error while calling a function

2 vues (au cours des 30 derniers jours)
moonman
moonman le 18 Oct 2011
I have written a function which is working fine
The function is
function [dtmf]=dtmfdial(x);
Now i have made m file and these are contents of m file
% This is DTMFmain
yy=dtmfdial;
and when i run this main file by this command
dtmfmain(dtmfdial([2 3]))
I get this error
??? Attempt to execute SCRIPT dtmfmain as a function: E:\Installed\Matlab 2011\Work\DTMF\dtmfmain.m
Plz help I just want to execute my function through a m file

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 18 Oct 2011
Your dtmfmain.m is not a function. It's a M-script. You can't pass an input argument to a M-script.

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by