Results 1 to 2 of 2
  1. #1

    Default Matlab Programming anyone?


    I just wanted to know who are Matlab programmers here.

    Though it doesn't allow you to create web applications, gui, etc. Its primarily intended for Mathematical computations/analysis, data analysis, etc. You can however export your algorithms in Matlab to a dll ...

    Who are currently into signal processing ang image processing?

  2. #2
    I'm not very good in Matlab programming. But I do have this problem with fft() (Fast Fourier Transform, in particular). When doing this in Linux octave, the results are OK, but when this gets plotted in Matlab, I've got strange results.

    Here's my code :

    Code:
    % 460800 Hz sample rate
    smpl = 0:1/460800:0.1; 
    % Create a sine wave of 30Khz
    sndwave = sin(2*pi*30000*smpl); 
    
    % Get the first 4096 samples of the sine wave and run Fast Fourier Transform
    Yplot = fft(sndwave, 4096); 
    % Plot the power spectrum
    Pyy = Yplot.*conj(Yplot);
    % Convert the result to decibels 
    logPyplot = 10*log(Pyy); 
    
    % Now plot the result in a graph
    
    % Set the x axis scale for the samples ...
    f = 460800*(0:2048)/4096; 
    
    % Plot data points of logPyplot (decibels) from 1 to 2049
    plot(f, logPyplot(1:2049));
    The plot in Octave gives:


    The result in Matlab is different from octave, octave seems to give the correct result while in Matlab there's a hyperbola with an asymptote at each side peaking at -40db. Quite strange, with a perfect sine wave the plots should give a steeper peak perhaps at -100db ...

    Anyone noticing this problem with Matlab R2009A?

  3.    Advertisement

Similar Threads

 
  1. MATLAB Programming
    By krisrubil4 in forum Programming
    Replies: 4
    Last Post: 07-28-2012, 05:30 PM
  2. Replies: 31
    Last Post: 04-27-2009, 12:46 PM
  3. Replies: 12
    Last Post: 04-17-2008, 04:48 PM
  4. Replies: 1
    Last Post: 03-28-2006, 07:00 PM
  5. Replies: 3
    Last Post: 02-24-2006, 10:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top