How to compute a solution with a sum in matlab
1 view (last 30 days)
Show older comments
My code is like this:
s=0;
for t=h:length(data);
s=s+data(t)*data(t-h)
end
And I need to find h to make s=0
1 Comment
Answers (1)
Satwik
on 4 Jun 2023
s=0;
for h=1:length(data)
for t=h:length(data);
s=s+data(t)*data(t-h)
end
if(s==0)
disp(h);
end
end
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!