필터 지우기
필터 지우기

How calculate the first 6 iterations when x_0 = 0 of x_{n+1}=e^(-x_{n})?

조회 수: 1 (최근 30일)
How calculate the first 6 iterations when x_0 = 0 of x_{n+1}=e^(-x_{n})?
My problem is that you make a table with these iterations, I am new to Matlab and I hope you can help me

채택된 답변

Image Analyst
Image Analyst 2012년 11월 20일
First set x_0 equal to zero, like you've already done. Then you need a for loop where the index is called n and goes from 0 to whatever. In the loop, assign x(n+1). To do e to a power, use the exp() function. Use parentheses instead of braces. That should be more than enough hints. Look up the for loop in the help if you don't know how to do a for loop.
  댓글 수: 2
Mauricio
Mauricio 2012년 11월 20일
Thanks for the help, just one more question How are tables in matlab?
Image Analyst
Image Analyst 2012년 11월 20일
You can use the uitable() command if you want a spreadsheet-like table on a GUI. Otherwise, just put the name of the variable as a line in your program and it will display the matrix to the command window.

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

추가 답변 (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