Réponse apportée
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...

presque 11 ans il y a | 1

Réponse apportée
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...

presque 11 ans il y a | 7

| A accepté

Réponse apportée
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...

presque 11 ans il y a | 7

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 3

| A accepté

Réponse apportée
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 ...

environ 11 ans il y a | 3

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 2

| A accepté

Réponse apportée
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(:...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
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); ...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 2

Réponse apportée
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...

environ 11 ans il y a | 4

Réponse apportée
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 ...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
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');

environ 11 ans il y a | 0

| A accepté

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

environ 11 ans il y a | 1

| A accepté

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

environ 11 ans il y a | 1 réponse | 3

1

réponse

Réponse apportée
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...

environ 11 ans il y a | 3

Réponse apportée
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')

environ 11 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
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: ...

environ 11 ans il y a | 0

Réponse apportée
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,...

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 11 ans il y a | 0

Réponse apportée
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. ...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 11 ans il y a | 0

| A accepté

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

environ 11 ans il y a | 0

Réponse apportée
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...

environ 11 ans il y a | 1

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 1

Charger plus