Submitted


scaleax
Scale data and axis limits after plotting.

11 years ago | 1 download |

0.0 / 5
Thumbnail

Answered
How to multiply special elements
Here's one way: A = magic(5) [cols,rows] = meshgrid(1:size(A,1),1:size(A,2)); A(mod(rows,2)==0&mod(cols,2)==1 | ...

11 years ago | 0

Answered
Referencing variables in the workspace
Does this help? x = 1; y = 2; s = who; s(1)

11 years ago | 0

| accepted

Answered
Plot a sound to get sine waves
Can you upload the wave file? Without having the data it's hard to guess, but perhaps you're seeing too many sine waves squishe...

11 years ago | 1

| accepted

Answered
How from uint8 to 0 and 1?
Tinker with this threshold value: threshold = 250; A = imread('export_fig_out.png'); A(A>=threshold)=255; A(A<th...

11 years ago | 0

Answered
Multiple plots are not showing in my code?
It looks like your data are plotted right on top of each other. See: clear clc x = linspace(0, 4*pi); y = sin(x); ...

11 years ago | 1

| accepted

Answered
How to detect the locations of the peaks in a signal??
Is <http://www.mathworks.com/matlabcentral/fileexchange/25500-peakfinder this one> better than |findpeaks|?

11 years ago | 0

Question


Is it possible to merge HDF5 files?
I'd like to merge two HDF5 files into one. My files have several dozen sub-levels and sub-sub-levels of data columns. For a si...

11 years ago | 1 answer | 0

1

answer

Answered
Using a time-stamp to find the median for every hour
The hourly median of ~10 second data can be found easily if you have time in Matlab's <http://www.mathworks.com/help/matlab/ref/...

11 years ago | 0

Answered
how do i plot a graph in xy-plane?
The answer should become evident when you understand the answer to your <http://www.mathworks.com/matlabcentral/answers/161478-h...

11 years ago | 0

Answered
how do i plot a graph in xy?
If you mean y equals x cubed, 1. define an x array: x = 1:100; 2. calculate y y = x.^3; 3. plot plo...

11 years ago | 0

Answered
Monthly average from time series with daily values
With <http://www.mathworks.com/matlabcentral/fileexchange/48361-downsample-ts/content/downsample_ts/html/downsample_ts_documenta...

11 years ago | 0

Answered
How to convert daily data to monthly?
<http://www.mathworks.com/matlabcentral/fileexchange/48361-downsample-ts/content/downsample_ts/html/downsample_ts_documentation....

11 years ago | 3

Answered
Replacing NaN values with average values of the nearest numbers?
With <http://www.mathworks.com/matlabcentral/fileexchange/48324-repnan/content/repnan/html/repnan_documentation.html |repnan|>, ...

11 years ago | 3

Answered
how to convert a 2D image into a 3D image.
It's hard to know exactly what you mean by convert to a 3D image. Try this: A = imread('eight.tif'); surf(double(A)) ...

11 years ago | 0

Answered
How to hadle NAN data of csv file
Three possible solutions: 1. If you have the Statistics Toolbox, average_x = nanmean(x(:)); 2. If you download the...

11 years ago | 2

Answered
Replace Nan with previous numbers
<http://www.mathworks.com/matlabcentral/fileexchange/48324-repnan/content/repnan/html/repnan_documentation.html |repnan|> can do...

11 years ago | 0

Answered
How to I interpolate only if 5 or less missing data next to each other?
The <http://www.mathworks.com/matlabcentral/fileexchange/45842 |interp1gap|> function allows you to specifiy a maximum gap lengt...

11 years ago | 1

Answered
Replace NaNs with next real value.
Thanks for your suggestions, y'all. It's nice that R2014b has the 'next' and 'previous' options for 1D interpolation. I ended ...

11 years ago | 0

| accepted

Submitted


repnan
Replace NaNs in a 1D array by interpolation

11 years ago | 1 download |

5.0 / 5
Thumbnail

Submitted


stat
Get a quick summary of variable statistics in the command window.

11 years ago | 2 downloads |

0.0 / 5

Answered
Error using Reshape pls help
How many elements are in |l_dp| before you try to reshape it? To reshape it into a 4 x 8 arrangement, |numel(l_dp)| must equal ...

11 years ago | 0

| accepted

Question


Replace NaNs with next real value.
How can I replace all |NaN| values in an array with the next non-NaN value in the array? I have x = [NaN 1 1 3 NaN NaN 4]...

11 years ago | 5 answers | 0

5

answers

Answered
How to use interpolation to transform data of one resolution onto the same grid as data of another resolution?
A clarification: There are about 111 km in a degree of latitude, but that relation is not valid for longitude. Do you have a...

11 years ago | 0

Answered
Mapping toolbox geoshow; superimposing US state boundaries but transparent state regions
Have you set any facealpha values? geoshow(states,'FaceColor',[1,1,1],'facealpha',.3); Also, with any transparency issu...

11 years ago | 2

| accepted

Answered
How can I play sound 1 after each other.
Have you tried this? mCombined = [m;Mhat1;Mhat2;Mhat3]; sound(mCombined,fs)

11 years ago | 1

Answered
How do you plot arrows in the streamline function ?
If the problem is that |streamslice| wants data in 3D and you only have 2D data, why not make up some fake z data? z = on...

11 years ago | 0

Answered
How to interpolate a 1D array to a larger size?
t = linspace(1,10,79); x = sin(t); ti = linspace(1,10,84); xi = interp1(t,x,ti); plot(t,x,'r.',ti,xi,'b.') ...

11 years ago | 2

| accepted

Answered
Lines and markers appear bloated in pdf
I've only used R2014b a few times, but in every case I've tried, <http://www.mathworks.com/matlabcentral/fileexchange/23629-expo...

11 years ago | 0

Answered
[probability help]probability of a certain number and a range of certain numbers
In this distribution, it looks like about 21% of the values are in the range of 6 to 8, inclusive: M = randi([5,18],10...

11 years ago | 0

Load more