Réponse apportée
Creating a vector to list values occurring within 5 seconds before a designated time
In your example, the number of clicks corresponding to a particular buzz is not the same for all buzzes, so storing as rows of a...

environ 10 ans il y a | 0

Réponse apportée
Subscript indices must either be real positive integers or logicals.
|number| is probably <0.5, and is therefore rounded to 0 (or a negative number). And as the error message says, indices have to...

environ 10 ans il y a | 0

Réponse apportée
How does regexprep work ? Clarify understanding
I think you're trying to make your pattern more complicated than necessary... building a regular expression via |sprintf| is rar...

environ 10 ans il y a | 1

Réponse apportée
Why does squeeze transpose my matrices without my permission and how to stop it?
You could set up a function that uses permute but allows for unlimited dimensions: mysqueeze = @(x) permute(x, [3:ndims(x) ...

environ 10 ans il y a | 2

Réponse apportée
How to creat topology with FOR loop
As Walter suggested, for R2015b or later, use graph objects. Prior to that, take a look at |gplot|: data = [... 1 0 0...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Plotting global flux data with colormap
Your example image looks very Ferret-y, so I'm assuming your data is currently in netCDF files. Can you give us some more deta...

environ 10 ans il y a | 3

| A accepté

Réponse apportée
Is there a way when using shortestpath to not only get the sequence of the nodes but also the edges between those nodes as output?
You've pretty much done all the work already. Once you have the indices to the edges, all you need to do is query the graph's e...

environ 10 ans il y a | 3

| A accepté

Réponse apportée
Convert to MATLAB date number
If you have a newer version of Matlab, you can parse this directly to a datetime object a = '2015-033T18:00:00'; d = dat...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
contours plot over heat map in matlab
By default, the color limits of an axis are set to span the maximum range of plotted objects that _could_ use a colormap. In yo...

environ 10 ans il y a | 2

| A accepté

Réponse apportée
Annotation box left corner position
A few things are happening here. First, by default, the alignment of the text in an annotation text box is in the upper right ...

environ 10 ans il y a | 9

| A accepté

Réponse apportée
How to make the subplots look larger and use the space judiciously.
To use the subaxis function, you need to follow the link provided there on the stackoverflow answer you reference (or this one: ...

environ 10 ans il y a | 2

| A accepté

Réponse apportée
Vectorization of anonymous functions
I don't think there's any way to force |matlabFunction| to properly parse the contents of its functions and adapt to vector inpu...

environ 10 ans il y a | 3

| A accepté

Réponse apportée
Dendrogram node line thickness based on node population
The line handles returned by the dendrogram function correspond to the pairs in the z. You can see this more clearly if you col...

environ 10 ans il y a | 0

Réponse apportée
How can I convert shapefiles to graph
A few questions: * Do you have the Mapping Toolobx? If so, look at |shaperead| to read the file in. * What version of Matla...

plus de 10 ans il y a | 0

Réponse apportée
How can I convert a 3 dimensional matrix into a single cell
Is this what you want? x = rand(4,3,2); x = {x};

plus de 10 ans il y a | 0

Réponse apportée
change the scale on graph
You can simply change the |YTickLabel| property: ax = axes; plot(1:10) ax.YTickLabel = strtrim(cellstr(num2str(2 * ax...

plus de 10 ans il y a | 0

Réponse apportée
Put lat/lon points onto an 80km x 80km grid
The |hist3| function will do the main binning for you, once you define your bin edges. A perfect 80km x 80km grid might be a li...

plus de 10 ans il y a | 1

Réponse apportée
White space in map grid.
The mapping toolbox functions clip data that intersect the map frame. With coarsely-resolved data, this can leave some undesire...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Align Two Data Sets by Date and Location Where Both Data Sets Are Missing Data Points at Random Dates and Locations?
The |ismember| and |unique| functions, with the |'rows'| option in both, should help: data1 = [... 20050505 ...

plus de 10 ans il y a | 0

Réponse apportée
How to set a color for a certan value (without showing that value in the colorbar)?
I suggest changing the 0-values to NaNs; in a surface plot, those values aren't plotted, so the background axis color shows thro...

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
Saving git log number of the current commit in MATLAB
To simply query using the git command via the OS: [s,git_hash_string] = system('git rev-parse HEAD') Not sure how this m...

plus de 10 ans il y a | 4

| A accepté

Réponse apportée
Vlookup technique in Matlab
My <https://github.com/kakearney/vlookup-pkg vlookup> function does this (using the same method Walter describes, in a nice litt...

plus de 10 ans il y a | 2

Réponse apportée
Any simple way to change a struct with fields of length "n" to a struct of length"n"?
How about this? A.time = [1 4 6 8 9]; A.field2 = [5 6 7 8 9]; A.field3 = [23 423 2 4 7]; B.time = [3 7]; B.fiel...

plus de 10 ans il y a | 0

Réponse apportée
Using logical AND in an if statement?
When evaluated on a vector, conditional statements return true only if all elements of the vector match the condition. So ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Divided colorbar automatically. Stop the blending of colors displayed
The default number of colors in a colormap is 64; if you decrease the number of colors, you get more discrete blocks: color...

plus de 10 ans il y a | 3

| A accepté

Réponse apportée
Algo for finding nearest coordinates of arbitrary point along complex 3D line?
I recommend <http://www.mathworks.com/matlabcentral/fileexchange/34869-distance2curve distance2curve.m>.

plus de 10 ans il y a | 0

Réponse apportée
interp3 gives error in some cases and accept some cases with the same size of meshgrid !
The difference between |ndgrid| and |meshgrid| is how they treat the first two dimensions. size_x = 3; size_y = 4; ...

plus de 10 ans il y a | 1

Réponse apportée
Repetition of values number of times
The code (in the future, it's more convenient for readers if you post short code snippets like this, rather than including them ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Plot legend shows same color for 2 graphs
What are the dimensions of your variables? If any are arrays rather than vectors, they will create multiple lines. In that cas...

plus de 10 ans il y a | 0

Réponse apportée
Loss of precision with netcdf time when using datenum
I wrote a function, <https://github.com/kakearney/daynoleap2datenum-pkg daynoleap2datenum>, that does the conversion that Peter ...

plus de 10 ans il y a | 1

| A accepté

Charger plus