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 次查看(过去 30 天)
显示 更早的评论
I have attached the reference files.
0 个评论
回答(2 个)
madhan ravi
2018-10-18
编辑:madhan ravi
2018-10-18
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 个评论
Walter Roberson
2018-10-18
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
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!