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'.]
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2021-8-11
编辑:Walter Roberson
2021-8-11
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
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!