Answered
How to mask data points outside a border using geoshow?
You seem to have combined both of my suggested methods into one in this example. Are you trying to do the mask-with-NaNs option...

8 years ago | 2

| accepted

Answered
Custom ColorMap Question: Does it have to be written as a script??
An alternative solution would be to use |pcolor| instead of |image|, |imagesc|, etc, and set your zero-values to NaN. The |pcol...

8 years ago | 0

Answered
Plotting different colored marker points for 4 seperate data entries
In your code, you're plotting a single point at a time. Matlab's default behavior is to cycle through colors each time plot is ...

8 years ago | 0

| accepted

Answered
give name to node in dendrogramm
The answer will depend on whether you're showing all the leaves of the dendrogram or not. If yes, then the |'Labels'| input wil...

8 years ago | 0

Answered
How to fit a different scale to an existing plot
The axis values are set by the x and y values you use when plotting. Try just changing the y values: x = 1600:10:2500; ...

8 years ago | 0

Answered
problem with hierarchical clustering
You concatenated 20 6 x 6 matrices. This results in 120 rows in your matrix, hence 120 leaves in your dendrogram (assuming you ...

8 years ago | 0

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

Load more