Answered
Problem with datenum (R2012a)
Based on your data... % Data snippet data = [... 2011 06 01 00 1898.800 0.423 2011 06 01 01 1905.340 0.765 2011 06...

12 years ago | 0

| accepted

Answered
Changing length of bar in legend
It can be done pretty easily with my legend-reformatting function, <http://www.mathworks.com/matlabcentral/fileexchange/31092-le...

12 years ago | 0

| accepted

Answered
Getting rows from dataset with particular value
isgen = ~cellfun('isempty', regexp(restInfo.Name, '^genName')); restInfo(~isgen,:) ans = val1 val2 ...

12 years ago | 1

| accepted

Answered
How to change land data to NaN?
The |inpolygon| function will do most of the work. Depending on the scale of your region and the format of the coastlines, you ...

12 years ago | 3

Answered
Get the avarage for coresponding cell contents from a cell array
If I understand you correctly, I think the following will do what you want. To take the average, I horizontally concatenated th...

12 years ago | 1

| accepted

Answered
How to plot vertical lines?
line([x1 x1], get(gca, 'ylim')); Or <http://www.mathworks.com/matlabcentral/fileexchange/9973-gridxy--v2-2-feb-2008- this fu...

12 years ago | 4

Answered
error with using ode45
How are you calling |ode45|? And where did you save the |reac.m| function? The error indicates that |ode45| isn't seeing the r...

12 years ago | 0

Answered
Plotting zigzag in a 2D contour
Hmm, more fun. Not exactly an out-of-the-box solution... I dug into my own toolbox of polygon stuff for this one, and tha...

12 years ago | 4

Answered
Adding two row arrays that are different lengths
Wouldn't it be easier to just convert your arrays to single numbers and add? array2num = @(x) sum(10.^(length(x)-1:-1:0) .* ...

12 years ago | 0

Answered
Plotting zigzag in a 2D contour
You mean hatching, or similar? If so, there are several entries on the FEX that do that. An overview of a few of them can be f...

12 years ago | 1

Answered
Convert ordered date to formal matlab date
syear = 1900; % Year corresponding to first set of numbers x = repmat(1:365, 1, 3)'; % Your data yr = cumsum(x ...

12 years ago | 0

Answered
How to get 2014b to render figures in retina resolution
Sorry, can't help with the problem, but I'm surprised that you seem to be implying that 2014b is retina-display compatible. O...

12 years ago | 0

Answered
Fill command for logarithmic plots axes labels
To automate dpb's suggestion, you can use my <http://www.mathworks.com/matlabcentral/fileexchange/16003-tick2text--create-easy-t...

12 years ago | 1

| accepted

Answered
Latex Interpreter - mean bar with subscripts
Like this? ylabel('$\bar{Cp}_{AL}$', 'interpreter', 'latex')

12 years ago | 2

Answered
Trying to plot a checkerboard on a graph using rectangles and for loop.
By using the |rectangle| command, you're going to end up with a lot of patch objects, which will work, but the |patch| command a...

12 years ago | 1

Answered
Undefined function 'geoidtst' Error
Which version of Matlab are you running on each machine? And do you have the Mapping Toolbox installed on both? What does ...

12 years ago | 1

Answered
How to set contourf colors ?
I wrote the <http://www.mathworks.com/matlabcentral/fileexchange/29638-contourfcmap--filled-contour-plot-with-precise-colormap c...

12 years ago | 3

| accepted

Answered
Placing Markers at Every Tenth Data Point and creating Label
If by label you mean a legend entry, I'd add a dummy line to use for labeling x = 0:pi/100:2*pi; y = sin(x); h = plot...

12 years ago | 2

| accepted

Answered
Vertical concatenation of structure fields
I'd do it with one loop and one cellfun. You might be able to eliminate the loop entirely, but this keeps it a little more read...

12 years ago | 2

| accepted

Answered
Why do I get 3 emails when watching a file in Matlab File Exchange
I often get multiple emails when I update my own functions too (which I watch to keep up with feedback comments). But not alway...

12 years ago | 1

Answered
Surface 'interpolation' along a specific contour
I would let |contour| do most of the work: [x,y,z] = peaks(20); % some example data, replace with yours surf(x,y,z);...

12 years ago | 4

| accepted

Answered
subplot command for plotting images
To do this sort of thing, I usually use a combination of <http://www.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subpl...

12 years ago | 1

Answered
Adding legends to plots in a for loop
Matlab won't allow more than one legend per axis. Perhaps try <http://www.mathworks.com/matlabcentral/fileexchange/31092-legend...

12 years ago | 1

| accepted

Answered
changing map projection after plotting data
I've found it's really a coin toss... sometimes, changing properties like projection, map limits, etc. actually reprojects the e...

12 years ago | 0

Answered
Help with contour plot
You can increase the number of contours using a fourth input, specifying either the number of lines or the values contourf(...

12 years ago | 1

| accepted

Answered
Creating a simple contour plot / Heat map
pcolor(a,b,c); shading interp; colorbar; The |contour| function plots contour lines, i.e. lines of constant value. ...

12 years ago | 2

| accepted

Answered
adjusting color in colorbar automatically
You'd have to repeat colors in the colormap the appropriate number of times. In this particular example, repeat each entry 9,4,...

12 years ago | 0

Answered
New variable based on a 'percentile' condition
Could do it all it one step with accumarray. Though this way doesn't preserve the initial order... not sure if that is necessar...

12 years ago | 1

Answered
Error using .* Matrix Dimensions must agree
Well, |diff| is always going to return a result 1 element shorter than the input, since it's measuring the distance between elem...

12 years ago | 1

Answered
Dealing with thematic maps, how to read a shapefile and giving him an additional data array
If you're comfortable with the geoshow/symbolspec combo, the easiest way to do this would be to add your additional data as new ...

12 years ago | 1

| accepted

Load more