Filter löschen
Filter löschen

What is the best error metric for complex numbers in matlab?

9 Ansichten (letzte 30 Tage)
Kalasagarreddi Kottakota
Kalasagarreddi Kottakota am 16 Jul. 2023
Bearbeitet: John D'Errico am 16 Jul. 2023
I need to calculate the error percentage for complex numbers and I generally use:
All measured and actual are complex numbers.
Is there any other metric in matlab to calculate errors in complex domain?

Antworten (2)

John D'Errico
John D'Errico am 16 Jul. 2023
Bearbeitet: John D'Errico am 16 Jul. 2023
First, why do you think this is inadequate? What don't you like about it?
Does it satisfy some basic requirements of a simple norm, in the sense that it is zero when the two are the same, and greater than zero when they are not? (Yes.)
Is it non-dimensional? That is, in the sense that if you scale all everything by any constant, will it yield the same value? This means if you change measurement units from meters to nanometers, the result will be no different. (Yes.)
Is it simple and terribly efficient to compute? (Yes.)
Is there something better than what has been used for longer than I have been alive? Not that I know of. Complex numbers work just like real numbers in this sense, as long as you use abs there.
Ok, how about this? Don't multiply by 100. That saves a CPU cycle by avoiding the multiply. And all you need to do is recognize that the multiply by 100 was always irrelevant, as long as you change your perception of what a small number is in context.
Seriously, there is no better secret formula that the rest of us know, but we never tell anyone who does not know the secret handshake. Or, maybe I just never learned the handshake. ;-)

Torsten
Torsten am 16 Jul. 2023
Verschoben: Torsten am 16 Jul. 2023
You can use the same expression also for complex numbers.
Measured = 1+1i;
Actual = 1.1+1.1*1i;
error = abs((Measured-Actual)/Actual)*100
error = 9.0909

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by