convert equation to matlab code
显示 更早的评论
Hi,How i can convert equation to matlab code?? like this , root( summation from i=1 to N [N(i)]Square ) plz can any one help me :(
回答(1 个)
Image Analyst
2011-11-27
Did you try
result = sum(N .^ 2)
but I'm not sure if N is the last index to sum to, or if it's the name of the array you're summing. You can't have it both ways. In my code above I summed over all elements in the N array.
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!