# The result of the operation in the calculator and the result of the operation in matlab are different

2 visualizzazioni (ultimi 30 giorni)
Aberg il 27 Ago 2021
Commentato: darova il 29 Ago 2021
Hello,
While doing the following operation in Matlab, the result is 2145.83, but when I do it from the calculator, it is 214.583. How can I fix this?
Data:
Db= 3000000
Do= 3
Tbbs= 60
With Matlab codes;
close all;clc
db=input(' db:');
Do=input(' Do:');
Tbbs=input(' Tbbs:');
Tdg= Db*(1+(Do/100));
Tds=Tdg/(24*60*60);
V=Tds*Tbbs;
fprintf(' %2.2f \n', V);
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Awais Saeed il 27 Ago 2021
Modificato: Awais Saeed il 27 Ago 2021
You must have missed a zero from Db. I am getting the same answer from MATLAB and calculator that is 2145.833333
##### 2 CommentiMostra NessunoNascondi Nessuno
Aberg il 27 Ago 2021
Thank you for your answer, I missed a zero from the db.
darova il 29 Ago 2021

Accedi per commentare.

### Più risposte (1)

the cyclist il 27 Ago 2021
I don't know what you did on your calculator, but it was wrong. The MATLAB result is correct, and I also double-checked this on a calculator. (You should also easily be able to verify this by hand, or in Excel, or ...)
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Aberg il 27 Ago 2021
Thank you for your answer, I missed a zero from the db.

Accedi per commentare.

### Categorie

Scopri di più su MATLAB in Help Center e File Exchange

R2021a

### Community Treasure Hunt

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

Start Hunting!

Translated by