Matlab question usin for ,while loop

Two friends A and B start with initial salaries of 1 unit and 1.25 unit, respectively. At the end of each year, they get a raise of 6% and 2% respectively. Write a MATLAB code that uses either a for or while loop to calculate annual salaries of the two until the year when A’s salary exceeds that of B’s. Report the value of the earliest year when A’s salary exceeds B’s. When the program ends, A and B should be a -dimensional vectors, containing their salaries in the respective years.

댓글 수: 5

Walter Roberson
Walter Roberson 2020년 5월 24일
what question are you asking of us?
Shubham Rawal
Shubham Rawal 2020년 5월 24일
Write a MATLAB code that uses either a for or while loop to calculate annual salaries of the two until the year when A’s salary exceeds that of B’s.
Are Mjaavatten
Are Mjaavatten 2020년 5월 24일
Have a look at here on how to get help with homework problems.
Walter Roberson
Walter Roberson 2020년 5월 24일
"Write a MATLAB code" is an order, not a question. A question would be something like, "Where can I find introduction to programming in MATLAB?"
Shubham Rawal
Shubham Rawal 2020년 5월 24일
Sorry for inconvenience caused Kindly answer the order

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2020년 5월 24일

댓글:

2020년 5월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by