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 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
ahmed hammad
le 11 Août 2021
Commenté : ahmed hammad
le 12 Août 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 commentaires
Réponse acceptée
Walter Roberson
le 11 Août 2021
Modifié(e) : Walter Roberson
le 11 Août 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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Numeric Types dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!