Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
17 Nov 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

Yes Olivier, or with:
>> imagesc(U,'AlphaData',~isnan(U),'AlphaDataMapping','none')
I just wanted to be able to paint NaNs with specifyc color without modifying the axes color.
Probably I should include this "transparent" option. Thank you!

Carlos

17 Nov 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Ripoll, Olivier

another way to obtain this is simply (fo a given array M):

alpha(imagesc(M),double(~isnan(M)))

You can of course get all the imagesc options since you can it directly.

11 Nov 2009 readline.m v3.0 (Jun, 2009) Reads the specified line(s) from a file. Author: Carlos Adrian Vargas Aguilera Richard, Martin

Well done

05 Nov 2009 saveascii.m v6.2 (Oct 2009) Save or display a matrix with given precision, delimiter or format for each (or every) column! Author: Carlos Adrian Vargas Aguilera Cegeon

Just adding to the positive reviews. It's amazing.

Something that took me 59 seconds to save using dlmwrite took only 8.5 seconds, nearly SEVEN times faster! AND it can append.

04 Nov 2009 moving_average v3.1 (Mar 2008) Smooths a matrix (with/without NaN's) via recursive moving average method and eliminates data gaps. Author: Carlos Adrian Vargas Aguilera Eric

Carlos,
I like your function moving_average, very easy to use. I have data which has small to large time gaps and I don't want to filter across the gaps. I could break the vector up at each gap but that would mean work. Any suggestion on how to handle something like this?

11 Oct 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Willem

My mistake or Mathworks mistake for not stating so in the help file. On a Mac you need to use the option key, not shift for zooming out. Works great now!

06 Oct 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

Hi Stefan, as far as I know, that functionality of the ZOOM and PAN functions does not work even on the first version of MATLAB v7.

One workaround is to edit "temporarly" the ZOOM/PAN function by adding the line
datetick('keeplimits')
at the end.

Or make your one function

function myzoom()
zoom
datetick('keeplimits')

and run
>> datetick
>> myzoom

Let me know if it works for you. Via email if possible.

Carlos

06 Oct 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Achleitner, Stefan

tlabel.m v2.6.1 (Sep 2009)

Dear Carlos

I tried to use tlabel within a Matlab 2006a Version?
I got the following error(see below).
Is you tool compatible with older matlab versions than the 2008a stated ?

If not, do you have any suggestions on similar alternatives to datetick that run under 2006a?

Thanks Stefan

??? Output argument "out" (and maybe others) not assigned during call to "D:\Programme\MATLAB\R2006a\toolbox\matlab\graph2d\zoom.m (zoom)".

Error in ==> zoom at 80
if nargin==2 && ...

Error in ==> tlabel at 242
  zh = zoom(xa);

 

02 Oct 2009 addaxes.m v1.1 (Sep 2009) Adds a new linked axis related by ANY monotonic function. Includes ZOOM/PAN and DATETICK utility! Author: Carlos Adrian Vargas Aguilera Caspar, J.

Simply terrific. I've wanted something like this for years. Thank you!

17 Sep 2009 moving_average v3.1 (Mar 2008) Smooths a matrix (with/without NaN's) via recursive moving average method and eliminates data gaps. Author: Carlos Adrian Vargas Aguilera shalom, almog

Very useful foe me (mainly for plotting)

31 Aug 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Raghu

I m not able to make check this out, i did follow all the steps mentioned but im getting one error:

??? One or more output arguments not assigned during call to 'C:\matlab\MATLAB701\toolbox\matlab\graph2d\zoom.m (zoom)'.

Error in ==> tlabel at 237
  zh = zoom(xa);

What do i need to do for this ?
Please let me know,
thanks,
raghu

28 Aug 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Otterson, Scott

This does a great job of solving a constant Matlab plot annoyance. They really ought to pay you for it!

27 Aug 2009 plots.m, plotses.m Plots each column of a matriz vs a single axis. Improvement of plotyyy. Author: Carlos Adrian Vargas Aguilera Liverpool, Mario

very good job, thank u!

26 Aug 2009 saveascii.m v6.2 (Oct 2009) Save or display a matrix with given precision, delimiter or format for each (or every) column! Author: Carlos Adrian Vargas Aguilera Itamar

Hi,

A great code! Works great with my files. Very easy to read and undersatnd. I used to work with matlab dlmwrite, but i found many bugs while saving. I think even that your code is faster than dlmwrite. Saved me a lot of debugging time.
Great job! Thanks for sharing!

25 Aug 2009 COLORMAP and COLORBAR utilities (Sep 2009) MATLAB color utilities including COLORMAP join and interpolation; freeze and fit COLORBAR, etc. Author: Carlos Adrian Vargas Aguilera Andrea

Hi everyone, I've got a problem: when I use the function cmapping in the command line it works, but when I try to use it in a GUI there are no errors, but the function does nothing, please help me.

23 Aug 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Parkyn, Roger

Worked well with the tests I ran. It seems to use good date formats when used in the default mode (i.e. just typing "tlabel;") so I will be using it in preference to "datetick;".

21 Aug 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Kearney, Kelly

I've been using an older version of this function for a few months now, and it's a great little utility, much more flexible than datetick. However, I noticed two small bugs with this release:

1) If you plot data that spans several years, then zoom in to a few-months range, a reference year will appear in the ylabel. However, when you revert to the original multi-year range, the reference year ylabel remains.

2) If datetick thinks there should only be one tick, the new version of tlabel will crash on tlabel>fixTicks line 1108. This is really due to buggy tick location calculations in datetick, and may only occur in older versions of Matlab (I'm running R2007a) since I believe datetick has been updated since then. This situation only seems to arise for a small subset of cases where data spans a year plus a few hours. Older versions of tlabel were able to handle this case.

Other than those two issues, great function, and I really like the new 'whichAxes' and 'reference' options.

21 Aug 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

Bugs fixed on v2.4 Roger! Carlos

21 Aug 2009 COLORMAP and COLORBAR utilities (Sep 2009) MATLAB color utilities including COLORMAP join and interpolation; freeze and fit COLORBAR, etc. Author: Carlos Adrian Vargas Aguilera David

21 Aug 2009 COLORMAP and COLORBAR utilities (Sep 2009) MATLAB color utilities including COLORMAP join and interpolation; freeze and fit COLORBAR, etc. Author: Carlos Adrian Vargas Aguilera David

Hello!

I use cbfreeze in combination with freezeColor and got exactly what I need!!!

THANK YOU!

David

21 Aug 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Parkyn, Roger

This looks very useful as I have been a bit frustrated with datetick not zooming so . I may be having trouble understanding the help though, as my testing of it didn't go very well (see script below, with comments). In particular:
1) tlabel; on its own didn't do much.
2) I couldn't feed it a numeric date format (e.g. 20) even thoughh the help says I can.

Any help with this would be appreciated as I will find this very useful.

Thank you

Roger Parkyn

sd = 734010:1:735000; %Test data vector
ydata = sin((sd - 734500)/73.4500); %Test data
figure; plot(sd, ydata);
tlabel('ddmmmyy');
datetick; %works ok but won't zoom
tlabel; %Doesn't give a sensible date format; just puts the serial date on
tlabel('ddmmmyy HH:MM');
tlabel(20); %Does not work; script fails

31 Jul 2009 plots.m, plotses.m Plots each column of a matriz vs a single axis. Improvement of plotyyy. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

To use 'reverse' in 'YDir' (or in 'XDIr' if 'left' o 'right' was used) in the included example use:

bt = 2; % 1=='bottom', 2=='top'
ylim = get(he,'YLim');
N = length(he);
for k = 1:N
 d = ylim{1}(1,bt)-ylim{k}(1,bt);
 ylim{k} = [ylim{1}(1,1)+d*(bt==2) ylim{1}(1,2)+d*(bt==1)];
end
set(he,{'YDir','YLim'},[repmat({'reverse'},N,1) ylim])

Cheers, the author

09 Jul 2009 linkzoom.m v1.3 (Aug 2009) Links the ZOOM and PAN regions of different axes. Author: Carlos Adrian Vargas Aguilera Andres

Very very good! Just when I needed such a function, linkzoom appeared as the Pick of the Week. As I mentioned there, it works well with addaxis, http://www.mathworks.com/matlabcentral/fileexchange/9016 , without the need to replace the original zoom function.
Thank you Carlos Adrian!

27 Jun 2009 COLORMAP and COLORBAR utilities (Sep 2009) MATLAB color utilities including COLORMAP join and interpolation; freeze and fit COLORBAR, etc. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

There is a little bug on CMAPPING. Magenta 'm' color is colored as red 'r' in v1.0. Well...

Carlos

27 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Creutzfeldt, B.

13 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Wang, David

Anyway, that won't make life easier. Probably I should simply do this:

pcolor((x(1:end-1)+x(2:end))/2, (y(1:end-1)+y(2:end))/2, c(2:end,2:end));

It's not perfect. The first/last column/row get dropped. But it should be sufficient for my use...

13 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Wang, David

Thanks for your response, Saludos.

First, PCOLOR(X,Y,C) regards X,Y as the edges of pixels, while IMAGESC(X,Y,C) regards X,Y as the centers of pixels. The latter is what I need.

Second, what I want is not 'interp' but 'faceted', namely facet lines at the edges of pixels, which is what PCOLOR does by default:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/pcolor1.gif

D.

11 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

Yes (kind of) but first, why would you like to do so if you can do it with PCOLOR? Well...

% Change line 359:
if aequal
%by:
if 0

% On empty line 398 write:
U = [U U(:,end); U(end,:) U(end,end)];
% Which is the trick. You may try other ways.

% Finally, change line 404:
'FaceColor','flat',...
% by:
'FaceColor','interp',...

% And that is it. Try imagescnan(peaks(5)) and you'll see the problem, which is that the interpolation is done on the edges and not on the middle of the faces (sort of). Maybe some day...

Saludos, Carlos Vargas

11 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Wang, David

This is a great script. I've got a relevant question. Do you know if it is possible to make imagesc/imagescnan draw facet lines as shading facets applies to pcolor?

Thanks!

09 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

I guess not Yu-nung, the program may flip the image if your axes are decreasing, but never the ticks. Try a normal IMAGESC or send me your script. Carlos

09 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Yu-nung Nina

One small mistake in my comment: on my personal laptop, the plot looks normal WITHOUT these two bizard things happening.

09 Jun 2009 imagescnan.m v2.1 (Aug 2009) Same as IMAGESC but ignores NaNs. Author: Carlos Adrian Vargas Aguilera Yu-nung Nina

Hi, this script is fantastic. However, I found 2 strange things happen:

1. Axis labels of both axes flip (the numbers become "mirror image" of normal axis tick labels)
2. When I try to plot a matrix of size 420x810, the plot does not complete itself. Instead the script only plots the first few rows and stops.

These two things happen on my lab computer (with matlab R2006a, R2008a, R2008b on it; I tried all of them). But on my personal laptop, the plot looks normal with these two bizard things happening. Is there any special settings in your code that is related to the computer itself?

05 Jun 2009 ndnanfilter.m Filter/smoothing of multidimensional data with an specified window function, ignoring NaNs. Author: Carlos Adrian Vargas Aguilera Rutishauser, Ueli

28 May 2009 extrema.m, extrema2.m Search all extrema points of a time series or a surface with/without NaN's. Author: Carlos Adrian Vargas Aguilera saucer, joe

hey guys.. is their anyway for this program to just give me the biggest maxes? my plot has many, many small peaks.. also, can you store these as variables?

05 May 2009 moving_average v3.1 (Mar 2008) Smooths a matrix (with/without NaN's) via recursive moving average method and eliminates data gaps. Author: Carlos Adrian Vargas Aguilera Peter

22 Apr 2009 readline.m v3.0 (Jun, 2009) Reads the specified line(s) from a file. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

Is not true Gabriel, it need to be like that so to be able to generate range from negative inputs. The author.

02 Apr 2009 readline.m v3.0 (Jun, 2009) Reads the specified line(s) from a file. Author: Carlos Adrian Vargas Aguilera Schreiber, Gabriel Akira

Thank you.

Imprivement:
When called readline(file, lines) and lines is a vector, it should not matter wether lines is a row or column vector.

06 Mar 2009 ginput2.m v3.1 (Nov 2009) Same as GINPUT but with ZOOM, PAN and (optionally) PLOT and image SCALE/GEOREFERENCE! Author: Carlos Adrian Vargas Aguilera Avila, Olga

This is really good!
It works perfect for me, and was exactly what I needed...
I just added a minor detail to plot a line from an input center point to the ginput point selected by the user (like a radial line). This was just to improve visualization for my needs.
Thank you very much!

27 Feb 2009 moving_average v3.1 (Mar 2008) Smooths a matrix (with/without NaN's) via recursive moving average method and eliminates data gaps. Author: Carlos Adrian Vargas Aguilera Kuo-Hsien

Dear all, I'm dealing with gap filling on weather measurements which the NaN should be filled based on the time window of several days.(i.e., neighborhood hour of several days).

For example, one NaN at 5pm will be replaced by the mean value in the neighborhood hour of neighborhood several days. (let's say 4, 5 and 6pm of neighborhood 5 days)

Here is the bone of question I like to deal with:

values = rand(1,1000)';
fake_NaN = floor(rand(1,300)'*1000);
values(fake_NaN) = NaN;
for i = 1:length(values)
n = 24 * i * (1:5)
having_nan_index = find(isnan(values))
new_values = nanmean(values(having_nan_index * n-1:having_nan_index*n+1))
:
:
Something like that
:
:

If you have any solutions or advices, please feel free to let me know. Thanks, Michael

17 Feb 2009 tlabel.m v2.6.1 (Sep 2009) Same as DATETICK but with ZOOM, PAN, LINKAXES and more! Author: Carlos Adrian Vargas Aguilera Thomas

Zoom-functionality makes it so much better than the built-in datetick! Thanks.

15 Jan 2009 moving_average v3.1 (Mar 2008) Smooths a matrix (with/without NaN's) via recursive moving average method and eliminates data gaps. Author: Carlos Adrian Vargas Aguilera gharsallaoui, hajer

hi Carlos i have send you an email about the difficulties in programmation of the recursive moving coverage have you any idea about this issue? any help please? thanks by advance

14 Nov 2008 extrema.m, extrema2.m Search all extrema points of a time series or a surface with/without NaN's. Author: Carlos Adrian Vargas Aguilera Wang, Yin

Excellent work, this is exactly what I need.

24 Oct 2008 plots.m, plotses.m Plots each column of a matriz vs a single axis. Improvement of plotyyy. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

You just need to use >> set(he(1),'Xlim',[0 1]), to modify the limits of the first axes from 0 to 1. Carlos

24 Oct 2008 plots.m, plotses.m Plots each column of a matriz vs a single axis. Improvement of plotyyy. Author: Carlos Adrian Vargas Aguilera Xu, A

How to set the range for each axis? Thanks

01 Oct 2008 LanczosFilter.m Low or high-pass Lanczos (cosine) signal filter. Author: Carlos Adrian Vargas Aguilera Vargas Aguilera, Carlos Adrian

Thank you Yanaki. In fact I have rewritten the code, but I haven't update it yet, because I'm reorginizing all of my programs. But thank you again, you are correct.

The author

29 Sep 2008 LanczosFilter.m Low or high-pass Lanczos (cosine) signal filter. Author: Carlos Adrian Vargas Aguilera Chandimala, Janaki

the line
elseif ~(numel(varargin{3})==1) || ~isreal(varargin{3}) || (varargin{3}==round(varargin{3}))
should be corrected as
elseif ~(numel(varargin{3})==1) || ~isreal(varargin{3}) || ~(varargin{3}==round(varargin{3}))
to avoid M not being an integer. Otherwise the code works only for the default M .

17 Sep 2008 int2strz.m Same as int2str but with zero padding to the left. Author: Carlos Adrian Vargas Aguilera Polk, Brien

i use it all the time... thank you

12 Sep 2008 linkzoom.m v1.3 (Aug 2009) Links the ZOOM and PAN regions of different axes. Author: Carlos Adrian Vargas Aguilera D'Errico, John

Nothing more to say here than - well done.

11 Sep 2008 linkzoom.m v1.3 (Aug 2009) Links the ZOOM and PAN regions of different axes. Author: Carlos Adrian Vargas Aguilera User, An

It works.

02 Sep 2008 ndnanfilter.m Filter/smoothing of multidimensional data with an specified window function, ignoring NaNs. Author: Carlos Adrian Vargas Aguilera Horton, Bill

2Dimensional hamming! Incrdible!

 

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