Answered
Determining 1, 2 and 3 sigma radii for a bivariate Gaussian histogram
If the point positions are in matrix format (or can be interpolated to matrix format using griddata or a similar function), the ...

4 years ago | 0

| accepted

Answered
plotting graph with multiple uknown variables
If the objective is to determine those parameters from data, it will be relatively straightforward to adapt the approach in Curv...

4 years ago | 0

Answered
Leged for multiple subplots
I cannot run the posted code without the included data. However this is a relatively straightforward problem. See: Plotting ...

4 years ago | 1

| accepted

Answered
Extract Data between two time points
Much depends on what the times are. Example — tv = linspace(0, 200, 500); % Tim...

4 years ago | 1

| accepted

Answered
How to Create a matching x vector for plot
I can’t run the code because I have no idea what the arguments are. That aside, try this — x = linspace(0,12,numel(y)); pl...

4 years ago | 1

Answered
find peak in data
Use either the findpeaks or islocalmax funcitons. The islocalmax function returns a logical vector, so to get the numerical ind...

4 years ago | 0

Answered
How do I plot this graph?
One approach, using the Symbolic Math Toolbox — syms x y=(11*x+2)/(2*x^3-1); figure fplot(y, [-10, 10]) grid .

4 years ago | 2

Answered
why my code gives different result then the formula
Nothing wrong, just that to get it to appear in polar coordinates, the surface data need to be processed first with the pol2cart...

4 years ago | 0

Answered
Volume Viewer App doesn't recognize MxNxP matrices
The BSOD problem could be Win 10. It’s not MATLAB, since I've had the same problem one one computer (desktop) while never on my...

4 years ago | 0

Answered
D bounded by y=(x-7)^2, y=7, x=0, y=0
This is the essence of the plot — x = linspace(0, 10); y1 = @(x) (x-7).^2; y2 = @(x) ones(size(x))*7; figure plot(x, y1(...

4 years ago | 1

| accepted

Answered
Why does pzoptions.FreqUnits have no effect on pzplot?
The options sturcture is being apploied correctly. To see this, it’s necessary to compare the default ‘rad/sec’ plot with the ‘...

4 years ago | 0

Answered
trouble coding for ODE's
The code works as far as it goes. The code needs to include initial conditions for and as separate parameters (call them and...

4 years ago | 0

Answered
Why does MATLAB give an error with this instruction? x(0.14*100)=5;
There was a detailed discussion on a closely-related topic recently in Why doesn't 'find' function work properly? The problem i...

4 years ago | 1

Answered
I need to create a vector from a symbolic polynomial function,but when i use sym2poly command, matlab tells me it is not a polynomial, how should i do?
One option is to use the coeffs function — syms c1 c2 c3 sympref('AbbreviateOutput',false); f1=(497*c1^2 + 497*c2^2 + 497*c...

4 years ago | 1

| accepted

Answered
How to program a click stimulus?
The Fourier transform of a square wave pulse is , so use that to synthesise the click — Fs = 44100; ...

4 years ago | 0

| accepted

Answered
How to clean this noisy ECG with movement artifact
Unforutnately, that is broadband, relatively high-amplitude noise that completely obscures the underlying EKG signal in that par...

4 years ago | 1

| accepted

Answered
Problem on numerical solution of y'=y^2+1
Try this instead, since the differential equaiton has an analytic solution — syms t y(t) de = diff(y) == y^2+1 yfcn = dso...

4 years ago | 0

Answered
Display intersection of two arrays
It would help to have the data. Synthesising some, this illustrates a straightforward approach — A = [(0:7053).' (0:7053)....

4 years ago | 0

| accepted

Answered
Want to remove a line in my plot
A = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/835480/A.txt'); A = A(:,[2 3]); B = readmat...

4 years ago | 0

| accepted

Answered
plotting a surface between 2D curves
One option is a patch object for this and another is surf — figure(2) x = linspace(28,224); y1 = repelem(1,100); y2 =repelem...

4 years ago | 1

| accepted

Answered
why bandwidth returns an "inf"?
It returns Inf because the bandwidth function requires a monotonically-decreasing signal, not one with a passband. Try this —...

4 years ago | 0

| accepted

Answered
creation of toeplitz matrix
It would help to see the code, since I have no idea what ‘r’ is. That aside, try something like this — cell_matrix = {rand(...

4 years ago | 0

Answered
How do I extract an entire 3D graph from MATLAB?
I’m not exactly certain what the desired result is, however in a surf plot for example, the surface object hass the information ...

4 years ago | 0

Answered
sym/solve: input order relevant for solution success?
Use the simplify function first, and both sork — syms a b gamma omega real positive syms C psi real assumeAlso(C > 0); as...

4 years ago | 0

| accepted

Answered
How to find FIR approximation of an IIR function?
If it is possible to calculalte (and ideally plot) the magnitude response as a function of frequency, use the firls funciton to ...

4 years ago | 1

Answered
Plot time series in date format from Excel sheet
There is nothing wrong with the dates. Try something like this — T1 = readtable('https://www.mathworks.com/matlabcentral/an...

4 years ago | 1

| accepted

Answered
Why doesn't 'find' function work properly?
Include a tolerance: wavelength = 0.35 : 0.001 : 0.8; idx{1} = find(abs(wavelength-0.6)<0.0001); idx{2} = find(abs(wavelengt...

4 years ago | 0

| accepted

Answered
Numerically solving a pair of coupled second order ODES with odeToVectorField
‘... the code I am trying to does not work for a pair of ODEs.’ Yes, it does. Look at the ‘Subs’ result from odeToVectorFiel...

4 years ago | 0

| accepted

Answered
Multiple histograms and how to measure fwhm?
Try this — M1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/833435/1to10_30s_15mm_diff_pivoted....

4 years ago | 0

| accepted

Answered
How to shade several areas in a plot?
Try this — x = 210:0.5:227; y = randn(size(x)); bands = [214 216; 221 223]; ...

4 years ago | 1

| accepted

Load more