Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Matlab advice needed!

Status
Not open for further replies.

epilot

Member
Hello friends,

Well, I need to make a circuit to take the square root of the audio for a project. But at first I want to make a test using MATLAB software and see the result on the sound card.
So I need to take the square root of an audio clip by MATLAB software and output the result to the sound card.
Unfortunately this is my first project by MATLAB and not aware what to do exactly!

is there any expert in the MATLAB field to help and direct me please?

Any help would be very appreciated.
 
First of all, you have to know the sampling rate of the sound stream you're gonna work with.
Second, import the sound file into Matlab simply by using the file/import menu.
Now, you have a matrix containing the data of your sound stream. you can do nearly everything with this matrix. playing a sound is simply done by the "sound" command in matlab, it has some arguments, the sampling rate(freq.) to be the most important. See Matlab help. For warming up, choose different sampling rates for the same sound matrix and have fun!
 
Many thanks for your guide sir.

I could import the audio clip in the matlab program but don't know how to take the square root of it.

I have found a command for this job:
"Square root (_sqrt) -- Compute the square root."
but don't know how to use it to take the square root of the audio clip and how to see the result.
Do you have any idea what to do after writing the above command in the "command window"?

Sorry but I am too newbie in the field.
 
Where did you get MatLab from?!?!?!?!? It is REALLY expensive... and i want a copy!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Marks256 said:
Where did you get MatLab from?!?!?!?!? It is REALLY expensive... and i want a copy!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Yeah, it is a torrture to pay that much. :D
 
It takes illegal methods. But almost everyone I know has a copy since no one wants to work on a 5 hour assignment in a computer lab.
 
Marks256 said:
Where did you get MatLab from?!?!?!?!? It is REALLY expensive... and i want a copy!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


I have got a copy of it and just paid 3 or 4$ for it.
It is a full version

I am wondered why dont you try to get its CD from your friend or...
It was too easy for the seller to make a copy from the original CD for me, so...

What's the story over there (instead of copy write law)?!
 
Zeo_Max said:
Yeah, it is a torrture to pay that much. :D

Lol. Good idea..... :D :D :D :D :D :D :D :D :D :D

My internet connection is slow, so it may take a while...
 
epilot said:
Many thanks for your guide sir.

I could import the audio clip in the matlab program but don't know how to take the square root of it.

I have found a command for this job:
"Square root (_sqrt) -- Compute the square root."
but don't know how to use it to take the square root of the audio clip and how to see the result.
Do you have any idea what to do after writing the above command in the "command window"?

Sorry but I am too newbie in the field.
First, I think there are misunderstandings. You use "copy write" instead of "copyright", and I think you mean to take the RMS value, because taking Square Root of sound seems to be meaningless.
You have to use "sqrt" command, not "_sqrt", Matlab Help is a great thing and I'm wondering why you don't use it.
Anyway, I think Simulink is much better for your job. use File/New/Model and Simulink is at your service. from the toolbar choose "library browser". You need a source from workspace (sound matrix) and a sink to it (result, in the form of a matrix, too), and also an RMS block. search for them in the library browser. Don't forget to see Matlab Help, It's Great, believe me!
 
Take the absolute value, then square it; do this for each point on the waveform, and take the average over a perioud of time. This will give you the RMS value.
 
alisarhangpour said:
First, I think there are misunderstandings. You use "copy write" instead of "copyright", and I think you mean to take the RMS value, because taking Square Root of sound seems to be meaningless.
You have to use "sqrt" command, not "_sqrt", Matlab Help is a great thing and I'm wondering why you don't use it.
Anyway, I think Simulink is much better for your job. use File/New/Model and Simulink is at your service. from the toolbar choose "library browser". You need a source from workspace (sound matrix) and a sink to it (result, in the form of a matrix, too), and also an RMS block. search for them in the library browser. Don't forget to see Matlab Help, It's Great, believe me!



Oh sorry, that mistake was due too hurrying up,
I meant "copyright" not copy write.

No, I am not talking about RMS(root mean square)..
What I am talking about is square rooting from audio AMPLITUDE.

I used MATLAB's help but as I said before I am too new In the field so I need more and more help.

by the way I have found a MATLAB tutorial book and hope to get more time to read it, I think it is very very important learning the matlab program.

P.s: Marks256, I would like to know if it is possible to borrow this software and other expensive softwares from somewhere like a library and take a copy of them in the PC's?
what's the real story there?
 
P.s: Marks256, I would like to know if it is possible to borrow this software and other expensive softwares from somewhere like a library and take a copy of them in the PC's?
what's the real story there?

I would seriously doubt it if a library would let one "borrow" MATLAB. A single licence for it is what? $800usd? I think that is what it was?

I am pretty sure it is out there on the net somewhere for free(and illegal)
 
Also requesting or posting warez on this form is against the rules and is a bannable ofence.
 
I am not requesting or posting.
 
Download a Torr... file sharing program and you can get any program or MP3 or movie or pc virus you want. There is one program that is 13GB and each guy has been downloading it for weeks.
I think it is illegal if you get caught.
 
Actually, bit torrenting isn't illegal. It is just the files that people tend to download that are illegal.
 
try to find how to make square root on a small matrix first and don`t forget to put a dot (.) after the command to applay the command on each element of the matrix
good luck
 
How good is this "GNU-OCTAVE"?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top