Help regarding "Attempted to access gainx(0.0101768); index must be a positive integer or logical." error.
Afficher commentaires plus anciens
Hi,
I'm not particularly competent with MATLab but I'm trying to create some basic parametric filters and I'm running into an error which I'm struggling to determine. I've found people with the same error message online but I've not understood the advice they've been given because again, I'm new to this and have only very basic knowledge.
I'm getting this error:
"Attempted to access gainx(0.0101768); index must be a positive integer or logical."
...in regards to this:
%
Q = 3.5;
Fc = 500;
gaindB = -10.00;
Fbw = Fc/Q;
Fs = 44100;
R = 1 - (pi*Fbw)/Fs;
gainx = db2mag(gaindB);
r = 1 - gainx(1-R);
omegat = (2*pi*Fc)/Fs;
A simple explanation would be welcome if anyone knows, thanks.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!