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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 1

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

más de 9 años hace | 2

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 3

| aceptada

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

más de 9 años hace | 3

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 2

| aceptada

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

casi 10 años hace | 9

| aceptada

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

casi 10 años hace | 2

| aceptada

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

casi 10 años hace | 3

| aceptada

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

casi 10 años hace | 0

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

casi 10 años hace | 0

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

casi 10 años hace | 0

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

casi 10 años hace | 0

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

casi 10 años hace | 1

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

casi 10 años hace | 0

| aceptada

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

casi 10 años hace | 0

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

casi 10 años hace | 2

| aceptada

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

casi 10 años hace | 4

| aceptada

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

casi 10 años hace | 2

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

casi 10 años hace | 0

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

casi 10 años hace | 0

| aceptada

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

casi 10 años hace | 2

| aceptada

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

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 1

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

alrededor de 10 años hace | 0

| aceptada

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

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 1

| aceptada

Cargar más