Risposto
subplot with 1 large and 2 small figures
Perhaps something like this — x = 0:0.01:6.2; figure subplot(2,2,[1 2]) plot(x, sin(2*pi*4*x)) subplot(2,2,3) plot(x, c...

oltre 3 anni fa | 2

| accettato

Risposto
Create waterfall with separated curve
Perhaps something like this — X = 0:555; Y = 1:8; Z = X(:)*Y*1E-2 + randn(numel(X),numel(Y)); figure waterfall(X,Y,Z.') ...

oltre 3 anni fa | 0

| accettato

Risposto
Help with "Error using / Matrix dimensions must agree."
Use element-wise division, so (./) instead of (/) — Air_desnity=[0.646:0.01:1.225]; W_412_MTOW=5534; A_412=153.93804; Power...

oltre 3 anni fa | 0

| accettato

Risposto
Calculate RR from ECG signals
A somewhat more direct approach — EKG = readmatrix('ecg.txt'); L = numel(EKG) Fs = 500; ...

oltre 3 anni fa | 1

Risposto
accessing subplot grid title (sgtitle) from figure properties
The sgtitle object is a child of the figure. The problem is that it doesn’t appear straightforward to access using findobj. ...

oltre 3 anni fa | 1

| accettato

Risposto
Fill the space between y-axis and curve with colours
It would be easiest to produce a series of patch plots for this, especially since the colours have to alternate. Example — ...

oltre 3 anni fa | 0

| accettato

Risposto
Find the first matched string/value from a table
One approach — VN = {'StepNum' 'Activity' 'TypeNum'}; step = [5098 5099 5101 5105 5106 5107 5113 ...

oltre 3 anni fa | 0

| accettato

Risposto
How to format individual elements in a timeseries
The various table arrays inherit their formats from the existing format. The only way to force a specific format is to write th...

oltre 3 anni fa | 0

| accettato

Risposto
Frequency response using input and output parameters only.
What data are you starting with, and what do you want to do with them? If you want to identify the system, see the documentat...

oltre 3 anni fa | 0

Risposto
Plot data from txt file
If you simply want to aggregate the data in each second and plot them that way, try something like this — Uzp = unzip('Data 2....

oltre 3 anni fa | 0

| accettato

Risposto
How to change a variable name without changing the value itself?
Save them as elements of a cell array instead, when you first create them.

oltre 3 anni fa | 2

Risposto
How can I distinguish from an unfiltered signal an eeg signal from an emg one?
Plotting is straightforward — LD = load('sigtest230504.mat'); s = LD.sig; L = numel(s); Fs = 1E+3; t = linspace(0, L-1, L)...

oltre 3 anni fa | 0

| accettato

Risposto
The FFT plot does not shows up, it is empty
Perhaps: data(isinf(data)) = NaN; data = fillmissing(data, 'linear'); since there may be a NaN or Inf value in ‘data’ that i...

oltre 3 anni fa | 1

| accettato

Risposto
Unable to solve the collocation equations -- a singular Jacobian encountered.
Your ‘odefcn’ has a divide-by-zero somewhere, since at x=0, ‘Y(2)’ is NaN, and setting ‘x’ to something greater than 0 ‘Y(2)’ is...

oltre 3 anni fa | 0

| accettato

Risposto
use readtable and wrong data
Perhaps: T = readtable('Predator_Setting.xlsx','Range','A1:B54', 'VariableNamingRule','preserve') Eartlier versions of readta...

oltre 3 anni fa | 1

| accettato

Risposto
Deleting spikes and reconstructing background noise
While it is possible to replace the spikes with broadband noise, here I just replaced them with a short sine segment — LD1 = l...

oltre 3 anni fa | 0

| accettato

Risposto
Extract values from a fig file?
Try this — F = openfig('Example.fig'); % Load File & Display Contents Ax = gca; ...

oltre 3 anni fa | 0

| accettato

Risposto
xticks and yticks with decimal exponents
Use the compose function to create a separate set of tick labels — % My attemot plot(10^(0):10^(3),10^(-8):10^(3)) set(gca, ...

oltre 3 anni fa | 1

| accettato

Risposto
How to calculate 50% and 66% width of each peak in the data?
Try this — LD = load('matlab.mat'); data = LD.filteredData.'; L = numel(data) Fs = 1000; x = linspace(0, L-1, L).'/Fs; ...

oltre 3 anni fa | 0

| accettato

Risposto
How to fill the area under the curve ?
I am not certain what result you want with respect to ‘under the plotted curves’. Adjusting that limit (defined here as ‘min(Da...

oltre 3 anni fa | 0

| accettato

Risposto
HOW TO FFT A NOISY EARTHQUAKE DATA
@Mary Claire — The problem with your data is that they are really noisy (that appears to be thermal or noise) that probably ori...

oltre 3 anni fa | 1

| accettato

Risposto
HP Filter array size problems in Matlab 2023a
It would help to have the data and the code. There are likely version differences, specifically that the arguments to the mld...

oltre 3 anni fa | 0

| accettato

Risposto
Storing numbers with lots of decimal places in arrays
Lacking detail as to what the analysis script does or what (if anything) it needs as input, I would put any input variables in a...

oltre 3 anni fa | 0

Risposto
i am an electronics student and trying the program for designing the FIR Filter in matlab. i am using the hamming function but it shows error.tried reinstalling same problem%P
The arguments to the MATLAB window functions (all of them) must be integers greater than zero, and ‘n1’ is -61. That is obvious...

oltre 3 anni fa | 0

Risposto
How to draw a picture in matlab as below:
That resembles a surfc plot. The contour normally only shows the contour llines, however setting the 'FaceColor' to 'flat' (fro...

oltre 3 anni fa | 2

| accettato

Risposto
Specifically find the first substantial peak in a graph.
Perhaps something like this — x = linspace(1.3, 3.3)*1E+4; yfcn = @(x) x.*exp(-0.00025*x); y = yfcn(x-x(1))/6 + [zeros(1,13)...

oltre 3 anni fa | 0

Risposto
I need data points from Labchart file according to stimulus time points in a other channel , how can i get it?
Your data initially appeared to be chaotic when I plotted them, so I took a closer look and found that most of them aere arrange...

oltre 3 anni fa | 1

Risposto
How to find the minimum distance from one point to other point ?
@Surendra Ratnu — I thought we covered all of this in How to find angle between a fixed point to multiple point ??.

oltre 3 anni fa | 0

Risposto
Ploting the magnitude of the laplace transformed signal against the frequency range
Since you are doing actual numeric calculations, one option is to use matlabFunction to convert ‘X_Laplace’ from a symbolic func...

oltre 3 anni fa | 0

| accettato

Risposto
How to restart optimization with ga ?
You can save the fittest individuals in each generation during the optimisation, then use the last (or all) of them to re-start ...

oltre 3 anni fa | 0

Carica altro