What's the difference between code?

1 次查看(过去 30 天)
It's a stupid question but these two line of code do the same thing wthere dt1 is a constant. Is it right?
prova= sum((out1.Y{i}(:,3:end)).^2)*dt1;
h=1;
for i=3:end;
y1=out.Y(:,i);
prova(h)=sum(y1.^2)*dt1;
h=h+1;
end;

采纳的回答

Walter Roberson
Walter Roberson 2014-2-22
Yes, they appear to be, at least to the limits of round-off error.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by