Answered

Using Worldmap function to develop maps

When you say "shape of the map", do you mean you want higher resolution coastlines? If so, there are many places to download hi...

Using Worldmap function to develop maps

When you say "shape of the map", do you mean you want higher resolution coastlines? If so, there are many places to download hi...

2 years ago | 1

Answered

Kriging codes in matlab

Walter's answer links to the best toolbox that I know of for kriging in Matlab. However, if you really want to use the gstat me...

Kriging codes in matlab

Walter's answer links to the best toolbox that I know of for kriging in Matlab. However, if you really want to use the gstat me...

2 years ago | 2

| accepted

Answered

How to create array of linearly spaced values from starting and ending points

This method is faster than looping over linspace: x = linspace(0,1,nPoints); A2 = go + x.*(st - go); Here's a timing ...

How to create array of linearly spaced values from starting and ending points

This method is faster than looping over linspace: x = linspace(0,1,nPoints); A2 = go + x.*(st - go); Here's a timing ...

2 years ago | 3

| accepted

Answered

How to make pcolor plot from three vector

You can calculate the bin averages pretty quickly using |discretize| and |accumarray|: Some sample data: npt = 10000; ...

How to make pcolor plot from three vector

You can calculate the bin averages pretty quickly using |discretize| and |accumarray|: Some sample data: npt = 10000; ...

2 years ago | 1

| accepted

Answered

How to take an average over one month during different years ?

A bit hard to tell from your screenshot whether your time array is an array of datetimes or an array of date strings. Assuming ...

How to take an average over one month during different years ?

A bit hard to tell from your screenshot whether your time array is an array of datetimes or an array of date strings. Assuming ...

2 years ago | 0

| accepted

Submitted

boundedline.m

Plot one or more lines with a shaded boundary (can represent error, confidence intervals, etc).

2 years ago | 156 downloads |

Answered

Function to read a 16bit color composite image to matlab

Many years ago, I had to work with some 16-bit color avi files. Those files stored the RGB color data using 16 bits per pixel: 5...

Function to read a 16bit color composite image to matlab

Many years ago, I had to work with some 16-bit color avi files. Those files stored the RGB color data using 16 bits per pixel: 5...

2 years ago | 0

Answered

Plotting vectors with different lengths due to missing values

Can you give a small sample of your data? Is it manually entered in a script, or are you reading it in from a file? In gener...

Plotting vectors with different lengths due to missing values

Can you give a small sample of your data? Is it manually entered in a script, or are you reading it in from a file? In gener...

2 years ago | 1

Answered

For loop: max iterations exceeded

That message typically comes from optimization routines, and it indicates that it wasn't able to meet the optimization criteria ...

For loop: max iterations exceeded

That message typically comes from optimization routines, and it indicates that it wasn't able to meet the optimization criteria ...

2 years ago | 1

Answered

Why my code doesn't work?

I haven't given any thought to the algorithm you show, though a quick test does seem to indicate it converges to cosh for small ...

Why my code doesn't work?

I haven't given any thought to the algorithm you show, though a quick test does seem to indicate it converges to cosh for small ...

2 years ago | 1

Answered

How can I speed up these for loops?

You're calling |interp2| 800 times with a single point each. Just moving that outside the loop should be able to speed things u...

How can I speed up these for loops?

You're calling |interp2| 800 times with a single point each. Just moving that outside the loop should be able to speed things u...

2 years ago | 0

| accepted

Answered

Change default behavior of cellfun to 'UniformOuput' = false

I really wish this was an option too! I use cellfun all the time, and almost always with cell outputs required. This is one of...

Change default behavior of cellfun to 'UniformOuput' = false

I really wish this was an option too! I use cellfun all the time, and almost always with cell outputs required. This is one of...

2 years ago | 1

| accepted

Answered

Generating 50 Random locations inside geo map data

Do you want the points to be specifically located in the named land mass? Or anywhere on land within the designated map limits?...

Generating 50 Random locations inside geo map data

Do you want the points to be specifically located in the named land mass? Or anywhere on land within the designated map limits?...

2 years ago | 0

Answered

How can I take the cosine argument with regexp

Perhaps I'm misunderstanding what you're looking for, but does the following match the pattern you want? str = 'cos(-2/3*pi...

How can I take the cosine argument with regexp

Perhaps I'm misunderstanding what you're looking for, but does the following match the pattern you want? str = 'cos(-2/3*pi...

2 years ago | 0

| accepted

Answered

Trying to plot a point on m_map but it does not appear.

Like |plot|, the default marker for |m_plot| is none... good for plotting lines, but not single points. Add a marker and you sh...

Trying to plot a point on m_map but it does not appear.

Like |plot|, the default marker for |m_plot| is none... good for plotting lines, but not single points. Add a marker and you sh...

2 years ago | 0

Answered

Mapping Toolbox: Eigenvector specifies Color of shape file

The easiest way to do this with complex polygons (multi-face polygons or polygons with holes, as is often the case with borders)...

Mapping Toolbox: Eigenvector specifies Color of shape file

The easiest way to do this with complex polygons (multi-face polygons or polygons with holes, as is often the case with borders)...

2 years ago | 2

| accepted

Answered

How do I get a "tabular" legend?

You can hack your way to a solution with my <https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-fle...

How do I get a "tabular" legend?

You can hack your way to a solution with my <https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-fle...

2 years ago | 2

| accepted

Answered

Freqz plotting warning when use latex as default interpreter

The Latex interpreter assumes text is written in Latex text mode, and requires typical Latex markup ($ or $$) to switch the stri...

Freqz plotting warning when use latex as default interpreter

The Latex interpreter assumes text is written in Latex text mode, and requires typical Latex markup ($ or $$) to switch the stri...

2 years ago | 2

Answered

Finding normals to contours on contour plot

Take a look at the various streamline functions ( |stream2|, |streamline|, etc). Depending on your surface, you may need to do ...

Finding normals to contours on contour plot

Take a look at the various streamline functions ( |stream2|, |streamline|, etc). Depending on your surface, you may need to do ...

2 years ago | 4

| accepted

Answered

plot multiple time plots

What version of Matlab are you running? Zooming and panning with a time axis is much easier with datetimes than datenumbers, bu...

plot multiple time plots

What version of Matlab are you running? Zooming and panning with a time axis is much easier with datetimes than datenumbers, bu...

2 years ago | 0

Answered

Merging Table with Duplicate Dates

The |accumarray| function is designed for this sort of problem: % Your data data = {... 736561 'USA' 2752 251 7...

Merging Table with Duplicate Dates

The |accumarray| function is designed for this sort of problem: % Your data data = {... 736561 'USA' 2752 251 7...

3 years ago | 2

| accepted

Answered

HOW TO UPDATE NEWREADER FILES ?

I'll confirm that I'm seeing the same thing when viewing the newsreader through the MatlabCentral viewer. I assume this is a pr...

HOW TO UPDATE NEWREADER FILES ?

I'll confirm that I'm seeing the same thing when viewing the newsreader through the MatlabCentral viewer. I assume this is a pr...

3 years ago | 0

Answered

Setting a title for a legend

As a workaround, <https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-flexible--customizable-legend ...

Setting a title for a legend

As a workaround, <https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-flexible--customizable-legend ...

3 years ago | 4

Answered

Plotting image over map

You'll need to georeference the image. You might be able to do this automatically on import if the image already has that info ...

Plotting image over map

You'll need to georeference the image. You might be able to do this automatically on import if the image already has that info ...

3 years ago | 1

Answered

How do I take average of specific portions of data with overlap?

First comment: don't store values in variables with numbered names like that. It just makes a mess, and that's why arrays were ...

How do I take average of specific portions of data with overlap?

First comment: don't store values in variables with numbered names like that. It just makes a mess, and that's why arrays were ...

3 years ago | 2

| accepted

Answered

MATLAB won't let me change the value of a string

Note that your initial code *doesn't* declare a 91x1 matrix of the word "base value", as you claim it does. TOTAL_VIEWPOINT...

MATLAB won't let me change the value of a string

Note that your initial code *doesn't* declare a 91x1 matrix of the word "base value", as you claim it does. TOTAL_VIEWPOINT...

3 years ago | 1

Answered

How do I plot value ranges in polar or spider

Given all your specifics, I think it would be much easier to just build the plot manually, rather than try to use any FEX entrie...

How do I plot value ranges in polar or spider

Given all your specifics, I think it would be much easier to just build the plot manually, rather than try to use any FEX entrie...

3 years ago | 3

| accepted

Answered

Remove duplicate locations and replace by a single one

If you simply want to isolate the points, perhaps my <http://www.mathworks.com/matlabcentral/fileexchange/61085-findclump findcl...

Remove duplicate locations and replace by a single one

If you simply want to isolate the points, perhaps my <http://www.mathworks.com/matlabcentral/fileexchange/61085-findclump findcl...

3 years ago | 0

Answered

Explicitly specifying line colors when plotting a matrix

An alternative method would be to save the handles of the plotted data and set the colors via the array option of |set|. I find...

Explicitly specifying line colors when plotting a matrix

An alternative method would be to save the handles of the plotted data and set the colors via the array option of |set|. I find...

3 years ago | 20

| accepted