Rank: 564 based on 128 downloads (last 30 days) and 10 files submitted
Personal Profile:
Professional Interests:
MRI, NMR, signal processing, rf engineering, instrumentation

 

Watch this Author's files

 

Files Posted by Mirko View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 May 2012 Screenshot Stacked Plot Stacked plots display spectra with time or another parameter. Five methods are provided. Author: Mirko Hrovat image processing, stacked plot, plot, 2d plot, graphics, plotting 30 1
  • 5.0
5.0 | 1 rating
27 Feb 2010 Squish Squish removes ALL singleton dimensions. Author: Mirko Hrovat matrices, squeeze, singleton, squish, matrix manipulation 2 1
  • 5.0
5.0 | 1 rating
21 Aug 2009 addcopyright add copyright information to an m-file or group of m-files. Author: Mirko Hrovat copyright permission ..., pick of the week, potw 9 4
  • 5.0
5.0 | 1 rating
03 Aug 2009 Screenshot Baseline Fit A baseline fit is interpolated from selected points and then applied to the data. Author: Mirko Hrovat baseline, analysis, peak, signal processing 38 2
  • 5.0
5.0 | 3 ratings
03 Aug 2009 char2cell Converts a character array (or cell string) array to a cell string array using delimiters and rows. Author: Mirko Hrovat cell, char, string, parse, delimiter, tokenize 16 0
Comments and Ratings on Mirko's Files View all
Updated File Comment by Comments Rating
18 Apr 2013 addcopyright add copyright information to an m-file or group of m-files. Author: Mirko Hrovat Sartorius, Sky

If I want to add/update copyright info for a file that's on the path but not in the current directory, a new version of the file (with copyright info) is created in the current directory. I changed line 180 to use uigetfile instead of uigetdir, which is more useful for me and helps with the aforementioned issue.

21 Jan 2013 Keep4 Keeps the listed variables in the calling workspace with a command format similar to "clear" Author: Mirko Hrovat Seo, Inkeun

useful!

15 Nov 2012 Baseline Fit A baseline fit is interpolated from selected points and then applied to the data. Author: Mirko Hrovat Krause, Michael

Exactly what I needed. Well done.

05 Sep 2012 Figure Management Utilities These M-files are a collection of utilities for managing groups of figures on multiple monitors. Author: Mirko Hrovat Eskerud Smith, Ivar

26 Dec 2011 addcopyright add copyright information to an m-file or group of m-files. Author: Mirko Hrovat Doke, Jiro

Hi Mirko,
Very nice entry! I have a need to put copyrights to all of my MATLAB files, so this will be very handy. I noticed one problem. If I have a function with some help comments and then have MATLAB code immediately after the comments (without a blank line), it doesn't append the copyright information:

function out = testfunction(in)
%TESTFUNCTION Summary of this function goes here
% Detailed explanation goes here
out = rand(in);
end

I expected this to become

function out = testfunction(in)
%TESTFUNCTION Summary of this function goes here
% Detailed explanation goes here

% Copyright 2011 The MathWorks, Inc.
out = rand(in);
end

Also, I have a couple of suggestions. I would like the tool to keep the number of blank lines between the comments and code. For example, if I have code like this:

% This is a comment

a = rand;

then the output should be

% This is a comment

% Copyright 2011 The MathWorks, Inc.

a = rand;

Notice that there's a blank line between the copyright line and the code. This preserves the spacing that originally existed in the code.

Second, I think it the function should look for:
1. "cell divisions"
2. blank line
3. Revision line
4. code line

"cell divisions" are used in cell mode like this:

%% Title
% This is a title cell.
%% Section 1
% This is section one.

In the above case, I think the copyright info should go right after the first cell (Title cell):

%% Title
% This is a title cell.

% Copyright 2011 The MathWorks, Inc.
%% Section 1
% This is section one.

This is a great entry. Thanks for creating this (and improving on Raymond's entry)! I am planning on highlighting this for Pick of the Week.

Top Tags Applied by Mirko
2d plot, analysis, baseline, bench, benchdat
Files Tagged by Mirko View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 May 2012 Screenshot Stacked Plot Stacked plots display spectra with time or another parameter. Five methods are provided. Author: Mirko Hrovat image processing, stacked plot, plot, 2d plot, graphics, plotting 30 1
  • 5.0
5.0 | 1 rating
27 Feb 2010 Squish Squish removes ALL singleton dimensions. Author: Mirko Hrovat matrices, squeeze, singleton, squish, matrix manipulation 2 1
  • 5.0
5.0 | 1 rating
21 Aug 2009 addcopyright add copyright information to an m-file or group of m-files. Author: Mirko Hrovat copyright permission ..., pick of the week, potw 9 4
  • 5.0
5.0 | 1 rating
03 Aug 2009 Screenshot Baseline Fit A baseline fit is interpolated from selected points and then applied to the data. Author: Mirko Hrovat baseline, analysis, peak, signal processing 38 2
  • 5.0
5.0 | 3 ratings
03 Aug 2009 char2cell Converts a character array (or cell string) array to a cell string array using delimiters and rows. Author: Mirko Hrovat cell, char, string, parse, delimiter, tokenize 16 0

Contact us