Azzera filtri
Azzera filtri

I am writing "function y = scmaenc(x, CB, h)" in MATLAB2017a and getting ↑ Error: Function definitions are not permitted in this context. can anyone explain?

1 visualizzazione (ultimi 30 giorni)
I have attached the reference files.

Risposte (2)

madhan ravi
madhan ravi il 18 Ott 2018
Modificato: madhan ravi il 18 Ott 2018
y = scmaenc(x, CB, h) %call the function properly
you can't run scmaenc.m by clicking the green button because your function requires inputs
  2 Commenti
Sajid Sarwar
Sajid Sarwar il 18 Ott 2018
I have defined "x, CB and h" but getting same error. If u plz go through the files I have uploaded and then guide me. thank you

Accedi per commentare.


Walter Roberson
Walter Roberson il 18 Ott 2018
You cannot paste that code in at the command prompt. Leave it stored in the file.
Your simulation also calls upon smadec which you have not provided, so we cannot test to completion. But if you store the files exactly as you attached and run simulation then it will get past calling smaenc and not fail until it needs smadec

Categorie

Scopri di più su App Building in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by