필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Loops and Recursion help

조회 수: 2 (최근 30일)
JAKE WISNIEWSKI
JAKE WISNIEWSKI 2019년 11월 5일
마감: MATLAB Answer Bot 2021년 8월 20일
Determine the numerical solution to the following two equations
x^2+x*y-10=0
y+3*x*y^2-57=0
through the use of iteration, solving the equations:
x(k+1)=sqrt(10-x(k)*y(k))
and
y(k+1)=sqrt((57-y(k))/(3*x(k+1)))
Initialize the x(k) and y(k) with 1.5 and 3.5 respectively. Use a while loop to determine the solutions of x and y so that the maximum error between x(k) and y(k) defined as
e(x)=abs(x(k+1)-x(k))/abs(x(k))
and
e(y)=abs(y(k+1)-y(k))/abs(y(k))
is less than 10^-4
  댓글 수: 5
Steven Lord
Steven Lord 2019년 11월 5일
Try writing down the steps you'd follow if you were solving this on pencil and paper as comments.
% Step 1
% Step 2
% Step 3
If your textbook has pseudocode, you could use those as your steps.
Once you have the basic outline, start figuring out how to implement each step. If you're not sure how to implement a particular step, break it into smaller sub-steps until you have something you can implement.
JAKE WISNIEWSKI
JAKE WISNIEWSKI 2019년 11월 5일
We dont have a textbook. We just get a small packet so I dont know what pseudocode is.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by