Answered
How can I have one unstacked bar in an otherwise stacked bar graph
I would simply call add a second bar object, making sure to specify the x-locations for each bar. I also prefer to pass specifi...

8 years ago | 1

| accepted

Answered
How to make a global map
If you have the Mapping Toolbox, |geoshow| with |worldmap| is usually good for a first pass: data = rand(72,144); rv = [...

8 years ago | 1

Answered
From a given number how to find the value closest to zero in a vector.
Star's answer works in the values in the vector are sorted. If not, |min| might be a better choice: vector = [93.60 119.15...

8 years ago | 0

Answered
How to plot using "Hierarchically grouped boxplot"?
You can do something similar to this with my <https://github.com/kakearney/boxplot2-pkg boxplot2.m> function (sorry, the GitHub ...

8 years ago | 0

Answered
How to plot a list of variables that can change
Don't name your structure fields using hard-coded numbers like that; instead, use an array: Data.N(1).XY = rand(10,2); D...

8 years ago | 0

| accepted

Answered
How do I make coloured scales from multiple graphs the same?
Just set the color axis limits to be the same on all of them: ax(1) = subplot(2,2,1); % plot, etc. ax(2) = subplot(2,2,2...

8 years ago | 0

| accepted

Answered
How to plot the intensity associated with 3-hour storms
The first step will be to pull out all the storm events from the timeseries. In this case, your looking for the points in the t...

8 years ago | 0

Answered
How do I use regexpi to collect a token from a key word until a new line?
Test data: str = {... 'Execute test.fun' '' 'Power On' '' 'Execute new test.mon' '' 'Random text for e...

8 years ago | 1

| accepted

Answered
Advantages and workarounds for using a main function for a project?
My preference is to keep large sets of parameters like this in a structure, which can be returned from a function. For example:...

8 years ago | 1

Answered
How can I speed up plotting lines over a map?
By clearing the map and replotting, you're forcing the plotting functions to repeat a lot of the projection calculations unneces...

8 years ago | 1

| accepted

Answered
Reading varying headerlines length, text files
I usually find the easiest way to do this sort of thing is to read the whole file in as plain text (assuming it's not too large)...

8 years ago | 0

| accepted

Answered
how to go about mapping a moving object (mapping toolbox)
It would help if you provided some more specifics... are your sensors arranged in a grid-like pattern, such that it makes sense ...

8 years ago | 0

Answered
How do I set the subplot position without worrying about the outside legends?
One option would be to change the position of the larger post-legend axis after the legend has been added, to keep them aligned:...

8 years ago | 0

| accepted

Answered
Contour plot in hexagon form
Take a look at the sparsity pattern of the matrix you built to represent your grid: spy(~isnan(Z)) I don't entirely foll...

8 years ago | 0

Answered
how do I copy existing subplots and aggregate them into larger subplots
If you don't have the code to reproduce the original figures (or if you simply prefer not to), you can use |copyobj| to copy the...

8 years ago | 3

Answered
rearrange martix as in actual domian
Do you mean you want to rearrange the values onto a grid, rather than as a list of indices? If so, perhaps <http://www.mathwork...

8 years ago | 1

Answered
How can I read many netcdf files with complex names by using loop in MATLAB?
Are you reading these files locally? Or is it via OPeNDAP? If the files are local, it may be easiest to query all the filename...

8 years ago | 0

| accepted

Answered
how to do interpolation?
A little more explanation of what you're trying to do is needed here. Are you trying to interpolate from scattered data to a re...

8 years ago | 0

| accepted

Answered
edge colordata property attempts to set are inconsistent
I've found that messing around with some of the undocumented properties of new graphics objects can be finicky, with properties ...

8 years ago | 2

| accepted

Answered
Error using Unique for table to remove duplicate rows which consists of mixed data types
Is your table really a table? Or is it a cell array? The error you're getting implies the latter. As the error message implie...

8 years ago | 2

| accepted

Answered
Subtracting the two resulting graghs of my ode program
You can either change the second input of both |ode45| calls to specify specific time values to output: tspan = linspace(0,...

8 years ago | 1

| accepted

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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 1

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

8 years ago | 2

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

8 years ago | 0

| accepted

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

8 years ago | 3

| accepted

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

8 years ago | 3

| accepted

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

8 years ago | 1

| accepted

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

8 years ago | 2

| accepted

Load more