Step-by-step:
- Add the following repository sudo add-apt-repository ppa:mtmiller/octave
- Install Update sudo apt-get update
- Install Octave sudo apt-get install octave
- Run Octave Octave -q
- KISS ! (Keep It Simple St*pid)
image=imread('image.jpg');
imwrite(image,'image_new.jpg','quality',50);
Those commands will compress "image.jpg" to "image_new.jpg" with the quality of compressed image is 50% of the original image.Please note, the current supported image format. when I wrote this article, is .jpg only.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function play the singal x as a sound.
% playsound(x, fs, bits)
% x : a signal vector
% fs: sampling frequency in Hz
% bits: quantization bits
%
% If encounter a error, try to transpose a signal vector,
% like playsound(x',fs,bits)
function playsound(x,fs,bits)
if (nargin != 3)
usage("playsound(x,fs,bits)");
endif
file= strcat(tmpnam(),".wav");
wavwrite(file,x,fs,bits);
system(sprintf("/usr/bin/paplay %s ; rm -f %s",file,file));
endfunction
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
white=rand(48000*10,1)*2-1;
>> a=5 a = 5 >> b=7 b = 7 >> c=a+b c = 12
sudo apt-get install octave
x=wavread('nama_file.wav'); % load file wav anda
save namafiletxt x -ASCII
load data save namafiletxt x -ASCII % load file mat
normdimana A merupakan root mean square (rms) dari amplitudo sinyal. Karena banyak sinyal memiliki dynamic range, maka SNR dapat dinyatakan dalam decibel (dB) sebagai berikut: