Answered

What should go in a next-generation MATLAB X?

I'd like to define ranges using square brackets for inclusive and rounded brackets for exclusive. So insead of if x>=20 & x<30...

What should go in a next-generation MATLAB X?

I'd like to define ranges using square brackets for inclusive and rounded brackets for exclusive. So insead of if x>=20 & x<30...

3 years ago | 0

Answered

How can I convert a shapefile boundaries to lat and lon?

If it's a standard map projection, use projinv.

How can I convert a shapefile boundaries to lat and lon?

If it's a standard map projection, use projinv.

3 years ago | 0

| accepted

Answered

How to find a figure's centroid inside a polyshape?

Also answered here, but reposting my answer in case anyone stumbles upon this thread. I just ran into this problem when trying...

How to find a figure's centroid inside a polyshape?

Also answered here, but reposting my answer in case anyone stumbles upon this thread. I just ran into this problem when trying...

3 years ago | 0

Answered

Better “centerpoint” than centroid of a concave polygon

I just ran into this problem when trying to place a text label in the middle of a crescent-shaped ice shelf. The centroid or the...

Better “centerpoint” than centroid of a concave polygon

I just ran into this problem when trying to place a text label in the middle of a crescent-shaped ice shelf. The centroid or the...

3 years ago | 1

Answered

Stereographic plot of Sea Surface Temperature Data around Antarctica.

Hi Ravi, There are a couple of ways to do this. Here's one way: Turn your vectors of latitude,longitude coordinates into 2D ...

Stereographic plot of Sea Surface Temperature Data around Antarctica.

Hi Ravi, There are a couple of ways to do this. Here's one way: Turn your vectors of latitude,longitude coordinates into 2D ...

3 years ago | 0

Submitted

gridbin

A MATLAB function for gridding large datasets of scattered data.

3 years ago | 4 downloads |

Submitted

fast-ice

Matlab functions for loading Alex Fraser's fast ice dataset.

3 years ago | 1 download |

Answered

plot using latitude and longitude

That looks like you have scattered data. If you have an array of latitudes, an array of longitudes, and a corresponding array of...

plot using latitude and longitude

That looks like you have scattered data. If you have an array of latitudes, an array of longitudes, and a corresponding array of...

3 years ago | 0

| accepted

Answered

polybuffer distance in meters?

I think you've got it right, Alex, but this calls for an explanation of the phrase numeric scalar. The word numeric just means a...

polybuffer distance in meters?

I think you've got it right, Alex, but this calls for an explanation of the phrase numeric scalar. The word numeric just means a...

3 years ago | 1

| accepted

Answered

ploting 2d graph of a vector

You've pretty much got it, but you'll need to define a range of t values, and a value for the constants A, and B. You also need ...

ploting 2d graph of a vector

You've pretty much got it, but you'll need to define a range of t values, and a value for the constants A, and B. You also need ...

3 years ago | 0

| accepted

Submitted

Climate Data Toolbox for MATLAB

A set of low-level functions and tutorials for analyzing and displaying Earth science data.

3 years ago | 143 downloads |

Answered

Specific color corresponding to specific data using contourf colormap

Perhaps @Kelly Kearney's contourfcmap is what you need?

Specific color corresponding to specific data using contourf colormap

Perhaps @Kelly Kearney's contourfcmap is what you need?

3 years ago | 0

Answered

Make a vector plot of the velocity field in polar coordinates

Can you use cart2pol to convert the coordinates and vector components to polar coordinates?

Make a vector plot of the velocity field in polar coordinates

Can you use cart2pol to convert the coordinates and vector components to polar coordinates?

3 years ago | 0

Answered

Why ?? Undefined function 'crosscorr' for input arguments of type 'double'.

crosscorr is part of the econ toolbox. If you don't have that toolbox, you can probably rewrite your code to use xcorr instead. ...

Why ?? Undefined function 'crosscorr' for input arguments of type 'double'.

crosscorr is part of the econ toolbox. If you don't have that toolbox, you can probably rewrite your code to use xcorr instead. ...

3 years ago | 0

Answered

Fit data recorded with different internal clocks

This is an interesting problem. If you can identify a few peaks that occur throughout the 600 s measurement, and those peaks are...

Fit data recorded with different internal clocks

This is an interesting problem. If you can identify a few peaks that occur throughout the 600 s measurement, and those peaks are...

3 years ago | 0

| accepted

Answered

How to create map with [x;y] coordinates? Mapping toolbox

No guaratees on the accuracy of the attached functions, but you may be able to convert between lat,lon and x,y using the attache...

How to create map with [x;y] coordinates? Mapping toolbox

No guaratees on the accuracy of the attached functions, but you may be able to convert between lat,lon and x,y using the attache...

3 years ago | 0

| accepted

Answered

How can i solve for this issue with the logical flow

I think the error is here: term3=q(i-1)*((r(i)-dr)/r(i)*dr); The first time through the loop, i=1, meaning i-1=0. There is no...

How can i solve for this issue with the logical flow

I think the error is here: term3=q(i-1)*((r(i)-dr)/r(i)*dr); The first time through the loop, i=1, meaning i-1=0. There is no...

3 years ago | 0

| accepted

Answered

Adding line change the size of the image

Can you get the axis limits before plotting the lines, and then set the axis back to those limits afterwards? Something like thi...

Adding line change the size of the image

Can you get the axis limits before plotting the lines, and then set the axis back to those limits afterwards? Something like thi...

3 years ago | 0

Answered

Color along line in polaraxes

What if you interpolate along a dense line and plot with polarscatter? I'm thinking something like this: theta = linspace(0,...

Color along line in polaraxes

What if you interpolate along a dense line and plot with polarscatter? I'm thinking something like this: theta = linspace(0,...

3 years ago | 0

| accepted

Answered

How to make a surface plot of imported data of a numerical function z=f(x,y)

Just to be clear, you already have the data, and it takes this form M = [x y z]; where x, y, and z are columns? My next qu...

How to make a surface plot of imported data of a numerical function z=f(x,y)

Just to be clear, you already have the data, and it takes this form M = [x y z]; where x, y, and z are columns? My next qu...

3 years ago | 0

Answered

time position in graphic

This question is pretty vague, but here's pi displayed at the bottom right corner of a plot: txt = text(1,0,num2str(pi,'%4i'),...

time position in graphic

This question is pretty vague, but here's pi displayed at the bottom right corner of a plot: txt = text(1,0,num2str(pi,'%4i'),...

3 years ago | 1

| accepted

Answered

I have a climatic dataset of a region where I am calculating time series (for drought index). The dimension of the dataset is 164*153*1416 (1416 months in the dataset and the others are the location). How I can average this over space and time?

To get a map of average SPEI, SPEI_mean = mean(SPEI,3,'omitnan'); and that calculates the mean along the third dimension (ti...

I have a climatic dataset of a region where I am calculating time series (for drought index). The dimension of the dataset is 164*153*1416 (1416 months in the dataset and the others are the location). How I can average this over space and time?

To get a map of average SPEI, SPEI_mean = mean(SPEI,3,'omitnan'); and that calculates the mean along the third dimension (ti...

3 years ago | 0

| accepted

Answered

Antarctic Mapping Tool: how can I evaluate the distance of a point from the coastline?

The easiest solution is the dist2mask function in the Antarctic boundaries add-on for AMT. Syntax is d = dist2mask('openocean'...

Antarctic Mapping Tool: how can I evaluate the distance of a point from the coastline?

The easiest solution is the dist2mask function in the Antarctic boundaries add-on for AMT. Syntax is d = dist2mask('openocean'...

3 years ago | 0

Answered

How to mask a 3-D raster using a multiple feature attribute shapefile?

Try this: mask = inpolygon(X,Y,[roi.X],[roi.Y]); You don't even need to remove the trailing nans. :)

How to mask a 3-D raster using a multiple feature attribute shapefile?

Try this: mask = inpolygon(X,Y,[roi.X],[roi.Y]); You don't even need to remove the trailing nans. :)

3 years ago | 0

Answered

how to turn netcdf into contour map

Hi Abigail, The first thing I do with a netcdf file is type ncdisp('myfile.nc') to see what's inside it. If you have some ...

how to turn netcdf into contour map

Hi Abigail, The first thing I do with a netcdf file is type ncdisp('myfile.nc') to see what's inside it. If you have some ...

3 years ago | 0

| accepted

Answered

Extracting data from matrix

To only plot the ocean data, try masking out the land data by setting those values in A to NaN. like this: A(B==1) = NaN; % se...

Extracting data from matrix

To only plot the ocean data, try masking out the land data by setting those values in A to NaN. like this: A(B==1) = NaN; % se...

3 years ago | 0

| accepted

Answered

Equal Sized random assortment, using randi?

This would be one way to define how many ones and how many twos in each column before randomizing them: N_cols = 8; % number o...

Equal Sized random assortment, using randi?

This would be one way to define how many ones and how many twos in each column before randomizing them: N_cols = 8; % number o...

3 years ago | 0

Answered

PCA Graph of Data Comes Up Blank

I think you're mixing and matching different ways of defining filenames. As a result, dir is unable to find the files you're loo...

PCA Graph of Data Comes Up Blank

I think you're mixing and matching different ways of defining filenames. As a result, dir is unable to find the files you're loo...

3 years ago | 0

Answered

datestr generating different string

How about myy = 2014; mym = 1; myd = 20; datestr(datenum(myy,mym,myd),'dd/mm/yyyy')

datestr generating different string

How about myy = 2014; mym = 1; myd = 20; datestr(datenum(myy,mym,myd),'dd/mm/yyyy')

3 years ago | 0

| accepted