Réponse apportée
colorbar floods 3dplots with text
Perhaps you could add a screenshot of what you see? Both lines of code produce the expected plane with colorbar plot on my syst...

environ 13 ans il y a | 1

Réponse apportée
How Do I Breakout and Store 2 Time Values In The Same String?
In order to capture different parts of an expression, put those parts in parentheses (note in the example below the difference b...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Custom colormaps and color bars
When trying to match colors of lines for objects plotted one at a time in a loop, I usually find it easier to manually set line ...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
Contour map from hist3()?
Supply output variables to hist3: [n,c] = hist3(X, [10 10]); contour(c{1}, c{2}, n);

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Box plot y-axis
Is this the sort of thing your looking for? x = arrayfun(@(a,b) ones(a,1)*b, trials, outcome, 'uni', 0) x = cat(1, x{:}...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
Putting files with numeral string names into numeric order
How about something like this? files = dir('*.txt'); numname = regexp({files.name}, '^[a-z]*', 'match', 'once'); allnum =...

environ 13 ans il y a | 0

Réponse apportée
How to interpolate to the nearest value
If you look at the documentation of |interp1|, you'll see that nearest neighbor interpolation is an option: interp1(x,y,xi,...

environ 13 ans il y a | 1

| A accepté

Réponse apportée
How can I grab the contour lines into a new figure ?
Easiest way: download <http://www.mathworks.com/matlabcentral/fileexchange/28447-contourcs-to-obtain-contourc-output-as-a-struct...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
How to retrieve multiple handles from plot function?
A few options. You could write a loop... for ii = 1:size(p,1) h(ii) = plot(p(ii,1), p(ii,2), 'o'); end or use...

environ 13 ans il y a | 0

| A accepté

Question


Extract outline of polygons defined by gridded mask
I'm attempting to extract the polygons defined by a gridded mask, where the mask is defined pcolor-style, i.e. by the grid cell ...

plus de 13 ans il y a | 3 réponses | 1

3

réponses

Réponse apportée
Extract outline of polygons defined by gridded mask
I decided to go ahead and try the not-so-quick method that first came to mind: actually calculating the polygon intersection of ...

plus de 13 ans il y a | 0

Réponse apportée
How to graph a connectivity/adjacency matrix?
Would |gplot| work for the basic setup? By default, the code doesn't allow the edge color modifications that you mention, but t...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Need help plotting 100 Strings onto grid (FOR loop not working)!
The slowdown is probably because you're trying to create 10000 annotation objects, and Matlab tends to get bogged down with too ...

plus de 13 ans il y a | 0

Réponse apportée
using contourc to calculate the length of a single level contour
You're on the right track. You could use two loops, but the vectorized version is cleaner. I've used the simple wrapper functi...

plus de 13 ans il y a | 0

Réponse apportée
How do I ignore the first few 0s in a vector but not ignore the 0s in the middle?
To just drop the leading zeros, how about this? p = p(find(p,1):end); And is this what you're trying to achieve via th...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Controlling dual axis plots
To put all the lines in one legend, pass the line handles directly to legend (rather than the axis handle, which is the default ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Plotting 4 column of data
Try scatter3. Assuming data is your n x 4 matrix: scatter3(data(:,1), data(:,2), data(:,3), [], data(:,4), 'filled');

plus de 13 ans il y a | 0

Réponse apportée
How can I plot on a line on the surface of the earth?
The example you point to may be a little more complicated than you need for your purposes, though you should be able to follow s...

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
how to avoid geoshow shrinking the axis
If you aren't plotting to a map axis, geoshow resets the data aspect ratio to [1 1 1], which may shrink the axis in one directio...

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
How to plot x y z coordinates and combine them with a 4th dimension
doc scatter3

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
inpolygon command for multiple areas
This should do it: http://www.mathworks.com/matlabcentral/fileexchange/7187-inpolygons Note that that function expects pol...

plus de 13 ans il y a | 1

| A accepté

Question


Reports on list of files, rather than current directory
Is there any way to run one of the Matlab reports (e.g. Dependency Report, Help Report, etc.) on an arbitrary list of files, rat...

presque 14 ans il y a | 1 réponse | 1

0

réponse

Réponse apportée
how to throw out certain intervals.
I'm not exactly sure of what you want (in your example, your x data seems to match your intervals exactly, which is a little con...

presque 14 ans il y a | 0

Réponse apportée
Removing lines in scatter plot when using shading interp
The shading command affects all surface and patch objects, including the child patch object that's part of a scattergroup object...

environ 14 ans il y a | 0

Réponse apportée
Change color order of legend
Rather than pointing the legend to the axis, pass the handles of the individual lines. This way you can specify exactly which l...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
cellfun usage trouble
Try evalin instead, which forces the function to reference the base workspace (rather than the local one): cellfun(@(x) eva...

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
How to plot 3D currents (in color and with arrows) according to u, v, w components
Some functions to look at: quiver3 scatter3

plus de 14 ans il y a | 0

Réponse apportée
Plot clean surface plots from scatter data
I'm not quite clear on the format of your data to start, since you say you can't convert from spherical to cartesian in your cas...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
changing the X tick label
Perhaps a little less ugly that Matt's suggestion (though not by much): lbl = arrayfun(@(x,y) sprintf('%d-%d',x,y), a, b, 'un...

plus de 14 ans il y a | 0

Réponse apportée
how can i know which toolbox a function is calling?
I prefer <http://www.mathworks.com/matlabcentral/fileexchange/17291-fdep-a-pedestrian-function-dependencies-finder| fdep> over d...

plus de 14 ans il y a | 1

| A accepté

Charger plus