Answered
Can this silly accumarray for-loop be removed by a vectorization?
I'm not sure if it will be faster, but you may try my <http://www.mathworks.com/matlabcentral/fileexchange/42577-aggregate aggre...

10 years ago | 1

Answered
Using xmlread and Document object model to get data from xml files
The DOM format is definitely not intuitive for someone without much object-oriented experience (like me), but I've found I can u...

10 years ago | 7

| accepted

Answered
How to create subplots with little vertical spacing?
The |subaxis| command allows you to specify different values for vertical and horizontal spacing. Try playing around with diffe...

10 years ago | 7

| accepted

Answered
how to create and use mixed colormaps associated to positive and negative data values?
I like using .cpt files for specific colormaps like this, with the <http://www.mathworks.com/matlabcentral/fileexchange/28943-co...

10 years ago | 3

| accepted

Answered
Why is ncread reading in times which are wrong by a year?
No, it's not a bug. Matlab datenumbers are defined as days since Jan 0, 0000. But if you look at the attributes for your time ...

10 years ago | 3

| accepted

Answered
How to extract values from a georeferenced image using point shape file??
The |ltln2val| function is probably your best bet. Are the X/Y values in your shapefile actually Longitude and Latitude? Or is...

10 years ago | 2

| accepted

Answered
Creating a Grid of Lat/Lon Values, in two columns
You'll want to use |meshgrid| or |ndgrid| to expand the vectors: [lat, lon] = meshgrid(-14:0.5:14); ltln = [lat(:) lon(:...

10 years ago | 0

| accepted

Answered
how to retain the label of the tick and add a new label at any specified tick value
If you want to keep the original numeric ticks as well, the following will do that: x = linspace(0,4*pi); y = sin(x); ...

10 years ago | 0

Answered
Can somebody tell me why, when I call a function using an input, the input is disregarded?
My crystal ball says you have a typo on line 23 of your function. Of course, my crystal ball is pretty unreliable... Perhaps...

10 years ago | 0

Answered
Out of memory. Type HELP MEMORY for your options.
While the previous answers will resolve generic memory issues, I would first suggest seeing if you really need the memory-intens...

10 years ago | 0

Answered
How to interpolate between two 3D shapes?
I would convert your surfaces into spherical coordinates with the origin at the center of your two bladder surfaces, then interp...

10 years ago | 2

Answered
How to hide one of the figure plot borders?
More programmatically... If you don't need any of the axis details, you can just set do set(gca, 'visible', 'off'); T...

10 years ago | 4

Answered
NetCDF4 into GeoTIFF/TIFF file conversion
Netcdf isn't an image format, it's a gridded data storage format. So you'll have to give us more information about the data in ...

10 years ago | 1

| accepted

Answered
Cannot overlay country/state/district borders from shapefile without blocking data?
If you just want the outline of the polygons in the shapefile, try: geoshow(borders, 'facecolor', 'none');

10 years ago | 0

| accepted

Answered
Create Permutation in Matlab.
a = cell(5,1); [a{:}] = ndgrid([-1 0 1]); a = cat(6, a{:}); a = reshape(a, [], 5);

10 years ago | 1

| accepted

Question


Equivalent of deal for a table
I often use |deal| to change the values of several cells in a cell array of strings: a = 1:5; b = {'one', 'two', 'three'...

10 years ago | 1 answer | 3

1

answer

Answered
Legend for a patches object
I usually create placeholder single-color patches to use for labeling purposes: % A multi-faceted patch, one color per face...

10 years ago | 3

Answered
How to enable Matlab maps to show longitude and latitude labels?
You need to set the label properties to on: setm(ax, 'meridianlabel', 'on', 'parallellabel', 'on')

10 years ago | 1

| accepted

Answered
Help using coordinates to overlay an image on a plot
If you need more than a simple translation of coordinates, you may want to look at the image registration functions in the Image...

10 years ago | 0

Answered
Need Way to calculate Line-of-Sight through Terrain that is faster than los2
If you profile a simple example, you'll see that nearly all the computation time of |los2| is being spent on the |cummax| subfun...

10 years ago | 1

| accepted

Answered
Intersecting rectangles coordinates (one rectangle can be contained within the other)
Assuming you already know the two polygons intersect, then you just need to compare where the left/right/bottom/top edges are: ...

10 years ago | 0

Answered
matlab says busy but isn't doing anything while running a script
You need to assign the proper output variables. My guess is you're calling the function by typing neighborsearch(tracer_x,...

10 years ago | 0

Answered
Coloring of specific elements using trimesh
I think the easiest way to do this would be to simply create two separate meshes, one that includes all points and one that only...

10 years ago | 1

| accepted

Answered
surf() plot adding axis
It appears as though your samples are unevenly spaced in time. So when you plot vs time, certain parts appear squished and stre...

10 years ago | 0

Answered
I want to fill in the gaps in a matrix (extrapolation) and produce nice looking plots such as this ->
A scattered interpolant is probably going to be your best bet, assuming you're starting with data that isn't on a regular grid. ...

10 years ago | 1

| accepted

Answered
How can I add a colorbar that lines up with an axis in a surf plot?
Determining the plotting area of a 3D axis can be tricky. But if you don't mind a little manual clicking, the following method ...

10 years ago | 0

| accepted

Answered
Matlab doesn't see a file
In your |exist| call, you refer to the file as |TEMPOgratingEfficiency.xlsx|, while the |dir| list shows |TEMPOgratingEfficienc....

10 years ago | 0

Answered
Can't apply an IF function with 100000*1 matrix
When applied to a vector, |if x < 0| is the same as |if all(x < 0)|. It doesn't iterate over the vector, and therefore it retur...

10 years ago | 1

Answered
What's wrong with scatterhist R2015a?
what do you get if you type which histogram -all My guess is you have an alternative |histogram.m| function shadowing th...

11 years ago | 0

| accepted

Answered
How to grid data based on distance, rather than longitude and latitude?
You could calculate the geographic distance from your data points to each point in the grid (using |distance.m| in the Mapping T...

11 years ago | 1

Load more