Rank: 15555 based on downloads (last 30 days) and 0 files submitted
photo

Donald

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Donald View all
Updated File Comments Rating
16 Aug 2009 save_to_base.m copies variables from the workspace of the calling function to the base workspace Author: Phillip M. Feldman

I found trouble when I had a stray "ans" variable floating around. I got this message:

??? The variable "ans" is undefined.

To avoid trying to copy "ans", I modified save_to_base.m so that the for loop now reads:

for i= 1 : length(variables)
    if ~strcmp(variables{i},'ans')
        tmp= evalin('caller',variables{i});
        assignin('base',variables{i},tmp);
    end
end

Very nice little function.

25 Jan 2009 Auto Peak Finder & Analyser Finds peaks, locations, fwhms and area in signal. Author: Martin Gorjan

yy = smooth(y) smooths the data in the column vector y using a moving average filter. Results are returned in the column vector yy. The default span for the moving average is 5.

The first few elements of yy are given by

yy(1) = y(1)
yy(2) = (y(1) + y(2) + y(3))/3
yy(3) = (y(1) + y(2) + y(3) + y(4) + y(5))/5
yy(4) = (y(2) + y(3) + y(4) + y(5) + y(6))/5

So if you do not have the MATLAB "Curve Fitting Toolbox", you can make your own smooth function from the above description.

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com