error in my maths?

x=data;
inter = (x(:,2))/(4.308e-3);
wave=20*log(10,(inter/0.00002));
I'm getting an error in line 23 - the final line above, and I can't figure out why - the input data is values from an oscilloscope and I'm trying to convert it to SPL, it works when I was just converting from voltage to pascals (second line) so I'm assuming it's something to do with the logarithm?
Any help is really appreciated

Respuestas (1)

madhan ravi
madhan ravi el 26 de Nov. de 2018
Editada: madhan ravi el 26 de Nov. de 2018

1 voto

EDITED
It's log10() the syntax you were using is applicable only in MUPAD but not in matlab
x=data;
inter = (x(:,2))/(4.308e-3);
wave=20*log10(inter/0.00002);

Etiquetas

Preguntada:

el 26 de Nov. de 2018

Editada:

el 26 de Nov. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by