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
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
Sam Thorpe
Sam Thorpe 2019년 2월 25일
the question is very vague. it just asks for us to iterate the function 100 times. i shall try and get some more clarity.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by