w = ((1+sin(pi*(t-b)/2/e))/2.*(t>b-e)-1 ) .*(t<=b+e)+ 1;
This equals 0 for t<b, then increases and equals 1 for t>e. Also note that Matlab has a large number of windows available.
And note that the way you're implementing the amplitudes is very different form the decibels you specify!
soundsc( scales the values of the audio signal y)y to fit in the range from –1.0 to 1.0, and then sends the data to the speaker at the default sample rate of 8192 hertz. By first scaling the data, soundsc plays the audio as loudly as possible without clipping. The mean of the dynamic range of the data is set to zero.
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Explore similar technical troubleshooting questions and verified MATLAB solutions: