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
madhan ravi
2018년 10월 18일
show how you are calling the function because I cant see any function calls
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!