Skip to main content

Posts

Showing posts from February, 2024

Stretch the dynamic range of the given 8-bit grayscale image using MATL...

How can I slice an audio from the front, and extract and save audio from the back.

  I have an audio file and I wish to slice the audio from the front and extract and save the audio from the back.   Let say I have a raw audio file of 20 seconds,   I want to delete everything from the start till 4 seconds,   and keep and save 5 seconds to 20 seconds, making it 16 seconds in the new saved audio file?   Could someone help with this? The below code is what I think may work, do correct my code.   filename='extension' [y, fs]=audioread(filename); samples=[0,length(y)-(4*fs)]; [y1,fs] = audioread(filename,samples); audiowrite('cutversion',y1,fs); save([extension '.wav'],'cutversion')   NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for you

How to find audio samples from MFCC?

  I had calculated MFCC of audio frames. I have to reconctruct audio samples from MFCC. NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. As per my understanding  of the question ,  you can reconstruct audio samples from MFCC in MATLAB using the following steps: Load the audio file into MATLAB. Extract the MFCC coefficients from the audio file. Use the? “ idct ( ) ” ?function to convert the MFCC coefficients back to audio samples. Play the audio samples. SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-find-audio-samples-from-mfcc-.php

How to add gain to an audio signal?

  Hi,   I wanted to ask if there is a way to add gain to an audio signal using MATLAB?   For ex., I have an audio file, and I want to add ~30dB gain to the signal. How can I do that? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Try this —    Fs = 44100; t = linspace(0, Fs-1, Fs)/Fs; s1 = sin(2*pi*t*15); dB30 = db2mag(30) dB30 = 31.6228 s2 = s1*dB30; figure plot(t, s1, 'DisplayName','Original') hold on plot(t, s2, 'DisplayName','Original With 30 dB Amplification') hold off grid legend('Location','best') SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-add-gain-to-an-au

Dividing speech signal into short-time segments?

  Hi all. I created a speech signal in Matlab. I need to divide speech signal into short-time segments with lengths 150 samples. Later I will process each segment to determine if it is voiced or unvoiced, and pitch period for voiced speechs. Here is the info: NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. If your sound signal is a vector, try to use reshape. For example from the info I understand that your sound signal would be a vector with 72000 elements which you want to divide in groups of 150.   SeperatedSoundSignal = reshape(soundSignal,150,72000/150); This will convert your vector into 72000/150 columns which have each 150 elements/samples. SEE

how to calculate signal to noise ratio for a sound recorded by microphone?

  i am trying to make a noise detection tool to detect weather the room is very noisy, noisy or quite .. so how can i calculate the signal to noise ratio for recorded sound for 200 mSec. ? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. to tell if a place is noisy, pros usually measure   dBA: on a microphone with known reception diagram, weighted air pressure signal power weighted, you have to ponder the audio frequencies to correct the human hearing that is not flat over audible frequencies.   MATLAB already has an Audio Toolbox that, once the hardware correctly set up, allows to measure both audio pressure power weighted and unweighted.   There is al

How can i return the output in an array to be used in a following function?

  Hello everyone!,   I am using the following formula to determine the atmospheric absorption based on each frequency according to a given distance. The array of frequencies was given based on a third-octave band.     myFreqArray = [25 32 40 50 63 79 100 126 158 200 251 316 398 501 631 794 1000 ... 1259 1585 1995 2512 3162 3981 5012 6310 7943 10000 12589 15849 19953]; %---------------- for f=myFreqArray z = 0.1068 * exp (-3352 / T) * (frN + f^2 / frN)^(-1); y = (T / To)^(-5/2) * (0.01275 * exp (-2239.1 / T) * (frO + f^2 / frO)^(-1) + z); alpha = 8.686 * f^2 * ((1.84 * 10^(-11) * (pa / pr)^(-1) * (T / To)^(1/2)) + y); %[dB/m] pt = pi * exp(-x * alpha * d) AtmosphericAbs=alpha*d; Aabs=20 * log10(pt/p0); Gain = Aabs - LdBinitial; end %myGainArray = [G1, G2, G3, G4, G5, G6, G7, G8, G9, G10, G11, G12, G13, G14, G15,... % G16, G17, G18, G19, G20, G21, G22, G23, G24, G25, G26, G27, G28, G29, G30]; release(graphicEQ); % Release system memory from previous run graphi

How to perform a thresholding operation on the gradient magnitude?

  This is the rules:   A simple edge detector using gradient magnitude   1. Compute gradient vector at each pixel by convolving image with horizontal and vertical derivative filters 2. Compute gradient magnitude at each pixel 3. If magnitude at a pixel exceeds a threshold, report a possible edge point.   But I don't know how to apply threshold manually in matlab (step 3.). Can anyone help me? im1 = rgb2gray(imread('dog.jpg')); [gx,gy] = imgradientxy(im1); [gmag,gdir] = imgradient(gx,gy); imshow(gmag,[]);   NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. I think they wanted you to use imfilter() or conv2() to do it &q

How do I align and subtract two data sets?

  I would like to subtract one data from the other to get an insertion loss. By insertion loss I mean that I am running (2) test cases, one control system and one with equipment in the line. I want to get the difference in signal amplitude between the two tests. Hence by inserting the equipment into the system, what is the loss of signal amplitude. Having the difference (and later the quotient) will let me conclude how the equipment affects the system at each source pulsation frequency.    Is there a way to ensure I’m subtracting the correct amplitudes by linking them to the frequencies?    Even if the vectors were the same length, there is some variability in the frequency data since it was taken manually from the tachometer. I can’t be sure that sample 2000 is the same frequency on one run as sample 2000 on the next run, or even that I get a value for that frequency.  NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help

How do I combine regions of regionprops?

  Hello, I use regionprops to get different regions within an image.   Obj = regionprops(~bw,{'Area','Extrema','Boundingbox','MajorAxisLength','MinorAxisLength','ConvexHull','Centroid'}); According to some assumptions I would like to recombine some Objs of the struct   For example I would like to combine 2 objects where the y-coordinate of the centroid is quite similar. This means, that the some values, Area, Centroid, Bounding Box have to be recalculated. What would be the correct way to do that? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. I believe you can set the label to be the same. For e

Can I borrow licenses for a number of hours, rather than days?

  I have my options file for my License Server set using MAX_BORROW_HOURS to set a number of hours for my users to check out licenses. However, when checking out licenses in MATLAB, I notice that the timeframe is only ever set for a number of days, and I am unable to set a specific number of hours to borrow. How can I borrow licenses for a timeframe more granular than a day?   NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Licenses can only be borrowed for a specified number of days. When borrowing licenses in MATLAB, the license will be borrowed until 11:59 PM of the day the license is borrowed until. For example, If I were to borrow a license for 3

How can I set the maximum borrow period for my network-based license?

  I have a borrow-enabled license and would like to set the maximum borrow period to less than the default of 30 days.   How can I accomplish this? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. To set the maximum borrow period to less than 30 days, you can use the MAX_BORROW_HOURS key word in your options file. The format for this entry in the options file is below.   MAX_BORROW_HOURS feature[:keyword=value] num_hours feature - is the toolbox this borrow period applies to   keyword=value - denotes the license feature this borrow period applies to. This is used when multiple licenses are in use.   num_hours - is the number of hours in the new borrow p

How to set an axis with arbitrary, but equally spaced, scaling.

  Hello,   I am attempting to replicate the following plot in a textbook using my own numerical solver. I am having trouble with replicating the x-axis in the plot for comparison since it is a bit odd. See the axes below:   I am aware that you can use Xtick to choose where ticks are located, but this does not affect the spacing of the ticks such that they are equally spaced like in the example above. The closest I am able to get is shown below: Log scaling does slightly better, but is still not evenly spaced like I would hope: Unfortunately I have not been able to find a way to change the scaling to be something other than linear or log. I am using MATLAB R2023a.   Does anyone know a way to create the evently spaced type of scaling seen in the first set of axes? NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100%