Skip to main content

Posts

Showing posts from December, 2022

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

How do i extract a few seconds from a given audio file?

  I want to extract the first 0.5 seconds of an audio file and make that portion of the signal as 0. I read the audio file and plotted it successfully but I'm having trouble figuring out how to extract the first 0.5 seconds. Should I use a loop? My code so far, is given below.   [x,fs]= audioread('C:\Users\prashantram.s\Desktop\hello.wav'); [m,n]=size(x); dt=1/fs; t=dt*(0:m-1); figure(1); plot(t,x);   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. idx = t<0.5 ; x = x(idx) ;      SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-do-i-extract-a-few-seconds-from-a-given-audio-file-.php

length of audio sample

  hello!   I am trying to import an audio sample into matlab and get matlab to tell me the length of the sample. Please can someone help me with 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. Just in case you got a wave file [y, Fs, nbits] = wavread(filename) %load the wav [m d] = wavfinfo(filename) %get the wav information Another way to get the length in seconds is: siz = wavread(filename,'size') %siz = [samples channels] siz(1)/Fs %should give you the length in seconds    SEE COMPLETE ANSWER CLICK THE LINK   https://www.matlabsolutions.com/resources/length-of-audio-sample.php

Plotting wav sound file onto graph

  Hey I am trying to plot a wav file in the time domain that I recorded from my own microphone onto a graph in matlab, I am reading in the file using audioread, and when I am plotting it, I am getting this weird orange superimposition over my graph. However, when I am using an audio clip from online and plotting it, it seems to be completely blue. What is the difference between the blue and the orange graphs? Is the orange portion ambient noise from my microphone? Here is my code   %filename is where I am getting the sound wav file from on my cpu, [y,Fs] = audioread(filename); %sound(y,Fs); size(filename); length(y) whos y; whos Fs; TotalTime = length(y)./Fs; t = 0:TotalTime/(length(y)):TotalTime-TotalTime/length(y); plot(t,y) Also as a follow up question, when I am going about finding the fft of these two waveforms, is it as simple as the following statements. nfft = fft(y); F = 1./t; plot(F,y)   NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help,MatLab Assignment Help

how to mix two audio signals?

  i have two audio signals y1 ,y2 .Now i wants y3 as mixture of y1 and y2 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. Simple mixing is just adding.    y3 = y1 + y2; If you want to control the level of each within the mix, then you need to adjust them as follows: y3 = (y1*y1_level) + (y2*y2_level); where yx_level is based on the decibel conversion: yx_level = 10^(level/20); So to make signal 2 half the amplitude of signal 1, you'd use -6 dB as follows: y3 = (y1*(10^(0/20)) + (y2*(10^(-6/20)); All of this assumes that the two signals are the same dimensions and have the same starting level.    SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabs

image restoration matlab code

  hello i am trying to implement this code to get the result in figure 5.26(b) but still something wrong could you help me in that  Refernce: digital image processing gonzalez third edition c = im2double(imread('Fig0526(a)(original_DIP).tif')); figure,imshow(c) a = 0.1; b = 0.1; T=1; [M, N] = size(c); h = zeros(M,N); for u = 1:M for v = 1:N h(u,v) = (T/(pi*(u*a + v*b)))*... sin(pi*(u*a + v*b))*... exp(-1i*pi*(u*a + v*b)); end end cf=(fft2(c)); c1 = cf.*h; c1a=(ifft2(c1)); figure,imshow(abs(log(c1a)+1), []);   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. The origin was not at the right place. Try this:   clc;