Answered
Moving window of standard deviation
To do this it seems that it would be sensible to combine movstd and movmean (or movmedian). Then something like this ought to il...

4 years ago | 0

Answered
How to plot a function for each element of an array N and with markers only?
If I understand you right something like this might be close enough. Change the line: plot (ty{m}, umid1{m}) to ph(m) ...

4 years ago | 0

Answered
How to save image in directory in MATLAB
For this type of folder-related work I typically define a basedir that make it possible to run the script from any directory: b...

4 years ago | 0

Answered
How to extract the radial profile in 'quarter' of circle?
Think of this in cylindrical coordinates: phi360 = linspace(0,2*pi,361); r0 = [x_lower_right,y_lower_righth]; r = 12; r_circ...

4 years ago | 1

| accepted

Answered
how mark the highest maximums of a graph?
You might get something from a simple solution like this (if your curve is not too noisy): [m_al_max,idx_max] = max(m_al); hol...

4 years ago | 0

Answered
Substitute C operator in matlab like divide, multiply, OR ,AND
For these operators matlab has bitshift, bitand, bitor, bitxor and a few more. My experience (~10 years ago) was that they were ...

4 years ago | 1

| accepted

Answered
Spectra replica after sampling a continuous time signal
But you do get the original spectra. When you downsample to an effective sampling-frequency of 4000 Hz, your Nyquist-frequency g...

4 years ago | 0

| accepted

Answered
Heatmap - multiple values in same cell
You can convert three-valued data into an RGB-image. The simplest way to go about this is something along these lines: dataRGB ...

4 years ago | 0

Answered
Can ginput be used with a fixed window size?
You can tell ginput to return N points: N = 11; [x,y,B] = ginput(N); Then ginput will stop after N points are selected. HT...

4 years ago | 0

| accepted

Answered
Fitting a curve to 3D data
If you need to "get an idea to start" you can start from here: function err = your_3D_error_fcn(pars,x,y,z,S,sigmaS,idx_is_OK_l...

4 years ago | 0

Answered
How do I solve forward dynamics 2nd order ODE with time-dependent parameters using ODE45?
Following from the comments above it seems as if you have a smoothly varying time-dependent torque that you know at a set of poi...

4 years ago | 0

Answered
Write Matlab function given an ODE and initial conditions
Have a look at the ODE-examples, both the demos and the corresponding code: >> odeexamples That should give you a good startin...

4 years ago | 0

Answered
Finding identity matrix-like square matrix given two rectangular matrices
When you have a (set of) mixed-determined linear inverse problem(s) you first have to come to terms that you cannot resolve ever...

4 years ago | 0

Answered
Trying to run ODE45 with system of two equations but its not working, any advice ? Thanks
Well, your problem is that your function fname will return a 3x1 array - that correspods to three coupled first-order ODEs. Sinc...

4 years ago | 1

| accepted

Answered
How to get global variables recognized in main and in functions at the bottom
Do not do this task as given. Learn to avoid global variables like the plague. Write a minimal function and test-script that ill...

4 years ago | 1

| accepted

Answered
dot indexing is not supported for variables of this type
Try your hardest to avoid global variables. They typically lead to bugs and errors that are hard to understand and trace - becau...

4 years ago | 0

Answered
How to sample a signal using Golomb Ruler ?
The only idea that makes sense to me with sampling like this using a Golomb-ruler is that you're expected to get estimates of th...

4 years ago | 1

| accepted

Answered
Why does plot quality reduce when plotting line and scatter together?
The painters-renderer that produces vector-format output, like eps doesn't understand alpha-type transparency. Therefore when yo...

4 years ago | 0

Answered
Curve Fitting in MATLAB
For this type of problems I learnt (before the arrival of the gui-curve-fitting tools) to use the standard function-minimization...

4 years ago | 0

| accepted

Answered
2D FFT of a 4D matrix
Shouldn't this effectively be the same as running an FFT on the entire 4D-array (with some confusion about normalization-factors...

4 years ago | 0

Answered
Losing pixels with imrotate
This happens due to aliasing-effects the discrete pixel-squares will start to mix and spread out between some neighboring pixels...

4 years ago | 0

Answered
I have an array of 6,76,000 as txt file, how can I convert that into 52x13x1000.
You could try reshape, see the help and documentation of that function. If you dont get the elements in the right order with som...

4 years ago | 0

| accepted

Answered
Creating a gif file out of an animation
I had a great experience using gif from the file exchange to convert a series of plots into a gif-animation. Simple to use does ...

4 years ago | 0

Answered
How can i form a filename from MATLAB identifier and correcting sntax error in "3dinvert.m"
There are restrictions of the filenames for matlab-functions, and as far as I recall it is supposed to not start with a number (...

4 years ago | 0

Answered
does convex hull intersect?
You should have two file-exchange packages that solves your problem: fast-and-robust-curve-intersections curve-intersections ...

4 years ago | 0

Answered
How to make a line plot with a colorbar as the third variable?
When I want to plot colour-coded curves I use one of these functions from the file exchange: cline, cline-m or plot-3d-color-li...

4 years ago | 0

Answered
Polar Plotting of Data
The pcolor in polar coordinates is the polar version of pcolor. For those functions you will need some kind of 2-D surface-like ...

4 years ago | 0

Answered
how to apply stft to audio signal?
You might do this, but the call to seconds looks spooky. From audioread you get the sampling-frequency fs, that is the sampling-...

4 years ago | 0

Answered
Assign a value to each page of a 3D Matrix
If we stick to the first rule of programming (KISS) this should get the job done: A = zeros([3,4,5]); x = [10 20 30 2^.5 exp(1...

4 years ago | 0

| accepted

Answered
Find and visualize the divergence of a vector function F = yzi xzj xyk. Please help me guys, please
Simply use the divergence function. Read the help and documentation to that one. If you have analytical expressions and access t...

4 years ago | 0

Load more