how can i calculate in matlab

조회 수: 86 (최근 30일)
Neha Jaiswal
Neha Jaiswal 2020년 6월 11일
댓글: Abdulrahman Farouq 2022년 1월 18일
we borrowed $1000 at a 10% anual intrests rate. if we do not makre a payment for 2 years, and assuming there is no penalty for non payment, how much do we owe now?
  댓글 수: 4
Alfred Jones Arokiaraj
Alfred Jones Arokiaraj 2021년 10월 8일
wrong answer . try in CI. answer will be 1.2100e+03
Walter Roberson
Walter Roberson 2021년 10월 8일
At the MATLAB command prompt give the command
format long g
now ask to display the result again.

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

채택된 답변

Atsushi Ueno
Atsushi Ueno 2020년 6월 11일
simple interest:
1000 + (1000 * 0.1) * 2
compound interest:
1000 + 1000 * 0.1 + (1000 + 1000 * 0.1) * 0.1
or
1000 * (1 + 0.1) ^ 2
as function
simple interest:
function current = simple_interest(debt, rate, period)
current = debt + (debt * rate) * period;
end
compound interest:
function current = compound_interest(debt, rate, period)
current = debt * (1 + rate) ^ period;
end
  댓글 수: 3
Atsushi Ueno
Atsushi Ueno 2020년 6월 11일
I'm sorry. I'll be more careful from now on.
Neha Jaiswal
Neha Jaiswal 2020년 6월 11일
thank you. it was first question so i was unable to understand.

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

추가 답변 (4개)

Roopesh R Peter
Roopesh R Peter 2020년 8월 3일
편집: Rik 2020년 8월 3일
Compound the interest once a year:
debt = 1000 + 1000 * 0.1 + (1000 + 1000 * 0.1) * 0.1
  댓글 수: 1
Rik
Rik 2020년 8월 3일
(I moved the flag content to the answer body, since it shouldn't have been a tag)

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


Shivani Dubey
Shivani Dubey 2020년 9월 17일
p = 1000
r = 10/100
n= 1
t = 2
S =(1.1)^2
debt = p* S
  댓글 수: 1
ahmed hammad
ahmed hammad 2021년 9월 1일
thanks i had a tried a different methode and it has the same result but it was rejected when i submitted it to COURSERA but when i tried to you know simplify it like you did it worked
Thanks.

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


Medical Imaging
Medical Imaging 2020년 9월 23일
The problem is simple and related to finance,
Borrowed_money = 1000;
Interest_rate = 10/100;
Delay_year = 2;
debt = Borrowed_money*(1+Interest_rate)^Delay_year

Jayashri Patil
Jayashri Patil 2021년 9월 13일
clear "all"
clc
n=input('enter the number of different pipe size: ');
rho=input('enter the value of density: ');
Mu=input('enter the value of viscocity: ');
Q=input('enter the flowrate: ');
e=input('enter the epsilon: ');
g=input('enter the accleration gravity: ');
for i=1:n
D(i)=input('enter the diameter of pipe: ','s');
L=input('enter the length of pipe: ','s');
KL(i)=input('enter the value of bends: ','s');
end
for i=1:n
A(i)=pi*D(i)*D(i)/4;
v(i)=Q/A(i);
ReynoldsNumber(i)=rho*v(i)*D(i)/Mu;
if ReynoldsNumber(i) <2300
f(i)=64/ReynoldsNumber(i);
elseif ReynoldsNumber(i) >4000
c=@(f)(l/sqrt(f(i)))+(2*log10*(e/D(i)*3.7+2.51/ReynoldsNumber(i)*sqrt(f(i))));
f(i)=fzero(c,[0.01,0.05]);
end
deltap(i)=(f(i)*(L(i)/D(i))*((rho*v(i)*v(i))/2)/1000); % pressure drop in kpa
HL(i)=(f(i)*(L(i)/D(i))+KL(i)*v(i)*v(i)/2*g); % head loss in m
end
  댓글 수: 4
Jayashri Patil
Jayashri Patil 2021년 9월 13일
how to take nth number of inputs from user
Rik
Rik 2021년 9월 13일
You already posted a very similar question. Why not post a comment there with a follow-up question?

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

카테고리

Help CenterFile Exchange에서 Financial Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by