Respondida
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...

más de 10 años hace | 1

Respondida
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...

más de 10 años hace | 7

| aceptada

Respondida
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...

más de 10 años hace | 7

| aceptada

Respondida
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...

más de 10 años hace | 3

| aceptada

Respondida
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 ...

más de 10 años hace | 3

| aceptada

Respondida
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...

más de 10 años hace | 2

| aceptada

Respondida
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(:...

más de 10 años hace | 0

| aceptada

Respondida
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); ...

más de 10 años hace | 0

Respondida
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...

más de 10 años hace | 0

Respondida
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...

más de 10 años hace | 0

Respondida
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...

más de 10 años hace | 2

Respondida
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...

más de 10 años hace | 4

Respondida
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 ...

más de 10 años hace | 1

| aceptada

Respondida
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');

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

| aceptada

Pregunta


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'...

más de 10 años hace | 1 respuesta | 3

1

respuesta

Respondida
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...

más de 10 años hace | 3

Respondida
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')

más de 10 años hace | 1

| aceptada

Respondida
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...

más de 10 años hace | 0

Respondida
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...

más de 10 años hace | 1

| aceptada

Respondida
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: ...

más de 10 años hace | 0

Respondida
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,...

más de 10 años hace | 0

Respondida
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...

casi 11 años hace | 1

| aceptada

Respondida
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...

casi 11 años hace | 0

Respondida
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. ...

casi 11 años hace | 1

| aceptada

Respondida
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 ...

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

Respondida
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...

casi 11 años hace | 1

Respondida
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...

casi 11 años hace | 0

| aceptada

Respondida
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...

casi 11 años hace | 1

Cargar más