Info
此问题已关闭。 请重新打开它进行编辑或回答。
Fast way to apply function to each value of an array?
1 次查看(过去 30 天)
显示 更早的评论
Hi there,
I created a function Fx which takes in a single value as input, use it for some calculation and produces a single number as output.
I want to apply that function on every values of the array n.
n = 1:300000;
I tried using for loop but it takes too long. Thus, I'm looking for another way to speed it up other than For loop.
Thank you
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!