hello everybody, i want to ask a little bit question, how i can get the value of x from this equation (sin(x)-sin(1.57)*exp(-(2*pi-x+1.57/2010.6))) , thank you
Best Answer
To get one solution within a range where there is a zero intersect:
>> fun = @(x) sin(x)-sin(1.57)*exp(-(2*pi-x+1.57/2010.6));
>> val = fzero(fun,[-1,1])
val = 0.0018695
If your audio signal is in MATLAB (perhaps usingaudiorecorder and its friends) it is already a digital signal. Pay specific attention to the sampling frequency‘Fs’, and the class of the data, since you may need to cast the data asdouble to process it if it not already a double array.
You appear to be attempting to do numeric integration. int() is only for symbolic integration. There are a number of numeric integration routines such as quadgk()
Side note:
double x;
would be the same thing as
double('x');
which would convert the letter 'x' to double precision and then throw away the result.
MATLAB does not use declarations of type. Dataypes are determined by assignment.
Best Answer
To get one solution within a range where there is a zero intersect:
Do you want to get multiple intersects?