Hi. I have been asked to iterate a function 100 times with an initial guess of x=4, but i am unsure how to go around it. I have been given the following function:
1 次查看(过去 30 天)
显示 更早的评论
function y=function_for_Ex6a(x)
for x=(127.0526);
y=4*(1-cos(x)).^2+x.^3;
end
3 个评论
Alex Mcaulley
2019-2-25
Give more information. What do you want to do whit this loop? Your function now is overwriting the value of x and it is just doing one iteration with x = 127.0526
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!