Info

此问题已关闭。 请重新打开它进行编辑或回答。

Error in coding a user defined MATLAB function

1 次查看(过去 30 天)
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 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by