Error in coding a user defined MATLAB function

Please I am getting error in using a "for" or "if" statement in a MATLAB user defined block.

댓글 수: 2

Chaya N
Chaya N 2016년 10월 22일
You can certainly use both. Would you mind posting your actual code here so we could see why you get such an error.
Monday Ikhide
Monday Ikhide 2017년 2월 8일
편집: James Tursa 2017년 2월 9일
Here is it please. The code seems NOT to work for Matlab function block. Its meant for real time applications
for i=3:inf
voltage_Ave(i)=(voltage(i)+ voltage(i-1)+voltage(i-2))/3;
end

답변 (0개)

이 질문은 마감되었습니다.

질문:

2016년 10월 22일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by