Answered
How to smooth discontinuous data with a moving average filter
I'd use |interp1| to get the yellow data to even spacing, then use Aslak Grinsted's <http://www.mathworks.com/matlabcentral/file...

10 years ago | 0

Answered
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
For new users, it might help to force askers to answer *yes* to these questions before their question can be posted: * Did yo...

10 years ago | 2

Answered
create a bar with different colors representing different categorical data
Run this: % Your samples: S1 = 'c c c c c c n n c n n c n n n'; S2 = 'c n c c n c c n n c n c c c n'; % R...

10 years ago | 0

| accepted

Answered
Undefined function for input argument of type double
Yesterday you most likely had a variable |P| that you were tinkering with, so when you ran the loop it was able to access actual...

10 years ago | 0

Answered
How to transform a XYZ-Array into a XxY-Matrix with Z as values of each Mxy-Component and vice versa?
Thanks to Walter's excellent suggestion to use |accumarray|, I wrote an <http://www.mathworks.com/matlabcentral/fileexchange/564...

10 years ago | 0

Submitted


.xyz file functions
Read .xyz files and make gridded datasets.

10 years ago | 7 downloads |

4.9 / 5

Answered
Finding the RGB value of a .fig at given X and Y locations
I wrote <http://www.mathworks.com/matlabcentral/fileexchange/53656-colorpicker |colorpicker|> to get rgb values from mouse click...

10 years ago | 0

| accepted

Answered
how could i plot a carte for the arctic region surface temperature (including all coasts) if i have latitudes , longitiudes and temperature data ?
This is not a matplotlib forum, so you might have better luck finding help on a Python forum. However, I can tell you how I'd t...

10 years ago | 1

Answered
Why doesn't this code work ?
I suspect you should not call |axesm| or |framem| if you're also using m_map functions. Where'd you get the |circles| funct...

10 years ago | 0

Answered
i have an image with a size of 300x300. how can i divide the image into 10x10 and then save it and take the average of 100 pixels ? thanks a lot guys
If you have the image processing toolbox, % Create a 300x300 image: I = peaks(300); % Resize the image to a scal...

10 years ago | 0

Answered
how can i draw a circle useing patch function?
You can use <http://www.mathworks.com/matlabcentral/fileexchange/45952-circle-plotter/content/circles_demo/html/circles_document...

10 years ago | 0

Answered
Is there any way to put a small matrix diagonally into a larger one?
A = [1 2; 3 4]; B = zeros(4,6); B(1:2,1:2) = A; B(3:4,3:4) = A;

10 years ago | 0

| accepted

Answered
accumarray error: Index into matrix must be positive
The zeros in |G| are not positive.

10 years ago | 0

Answered
How to plot two histograms: one line over another bar?
Here are two distributions, |x1| and |x2|: x1 = randn(993,1); x2 = randn(66,1); hist(x1,-5:.5:5) hold on h = h...

10 years ago | 0

| accepted

Answered
convert a matrix with some zero to non zero matrix
A = [ 1 2 3 ; 1 0 0 ; 0 0 0; 4 5 6]; % Find rows of all zeros: zerorows = sum(A,2)==0; % Discard rows of all...

10 years ago | 2

| accepted

Answered
problem with randsample when array with one element
Perhaps you want n = 3; % get a random index no greater than the length of n: ind = randsample(length(n),1); ...

10 years ago | 0

| accepted

Answered
How to plot bounding boxes for a person in a video frame?
If you have the bounding box coordinates in terms of rows and columns of pixels, you can simply use |plot| to plot the bounding ...

10 years ago | 0

Answered
Put lat/lon points onto an 80km x 80km grid
If you need even grid spacing you'll have to work in some projected coordinates. Use <http://www.mathworks.com/help/map/ref/pro...

10 years ago | 0

Answered
Sum of multiple cell in for loop
You can do this in a loop like: % Preallocate a variable A_sum: A_sum = NaN(size(A)); % Loop through each cell: ...

10 years ago | 2

| accepted

Answered
How to extract pixel values (region of 5x5 pixels) from a map in utm32 N? I
Do you have the Mapping Toolbox? If so you can use <http://www.mathworks.com/matlabcentral/fileexchange/47899-geotiffinterp/cont...

10 years ago | 0

| accepted

Answered
How to rename files?
You might try Jan Simon's <http://www.mathworks.com/matlabcentral/fileexchange/29569-filerename |filerename|>.

10 years ago | 0

Answered
Moving Variance, variable window size
I recommend Aslak Grinsted's <http://www.mathworks.com/matlabcentral/fileexchange/8251-moving-averages---moving-median-etc |movi...

10 years ago | 0

| accepted

Submitted


Curvature of Earth
Estimate the curvature of Earth over distances less than 1000 miles

10 years ago | 1 download |

5.0 / 5
Thumbnail

Answered
mean for matrix array
I tested your code with |t_u = rand(361,361,36)| and it seems to give values for all 6 slices. Do you have some NaNs in |t_u| t...

10 years ago | 0

Answered
I need help plotting y=x^4-4x^3-6x^2+15 on MATLAB as a for fuction from -3 to6!!
No loop necessary. x = -3:0.01:6; y = x.^4 - 4*x.^3 - 6*x.^2 + 15 plot(x,y)

10 years ago | 0

Answered
extracting portion of .nc file based on date
This will require a couple of steps. First, type ncdisp('2008.nc') into your command window. This will tell you what...

10 years ago | 0

Answered
GPS Colormapping regarding for drone
Hi Ugue, Use <http://www.mathworks.com/help/matlab/ref/scatter.html |scatter|>. To scale the color of dots relative to the ...

10 years ago | 1

| accepted

Answered
Problem with the mean of index
Do the values of indices |i| and |j| ever change? Can you describe in words what you are trying to do? I have a feeling it...

10 years ago | 0

Answered
Do you have a suggestion for a name of my function?
How about |ratchet|.

10 years ago | 1

Answered
Custom colored bar graph for a vector
You can set the |facecolor| of bar(s) when you call the |bar| function. Below I'm defining the rgb values of 15 colors with |je...

10 years ago | 0

Load more