I want so simplify a certain value(a number) but when I use vpa(debt) I get this error [ Undefined function 'vpa' for input arguments of type 'double'.]
1 view (last 30 days)
Show older comments
ahmed hammad
on 11 Aug 2021
Commented: ahmed hammad
on 12 Aug 2021
clear;
money_borrowed= 1000
m = money_borrowed
annual_interest= 10/100
a = annual_interest
time_passed_for_payment_in_year= 2
t = time_passed_for_payment_in_year
debt= m * (1+ a/12)^(12*t)
s=vpa(debt)
0 Comments
Accepted Answer
Walter Roberson
on 11 Aug 2021
Edited: Walter Roberson
on 11 Aug 2021
format bank
Q = @(v) sym(v); %convert number to symbolic number
money_borrowed = Q(1000)
m = money_borrowed
annual_interest= Q(10)/100
a = annual_interest
time_passed_for_payment_in_year = Q(2)
t = time_passed_for_payment_in_year
debt= m * (1+ a/12)^(12*t)
s = double(debt);
s
More Answers (0)
See Also
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!