Risposto
Plot with the same Y-axis on both sides
Duplicating the y-axis on the right side is not an option, however writing the tick labels on the right axis definitely is. T...

oltre 3 anni fa | 0

| accettato

Risposto
How to find 90% of each peak in a huge data range signal
It depends on what you define as a ‘peak’ and its relation to its surrounding values. Experiment with this and your data — ...

oltre 3 anni fa | 0

Risposto
Interpolated data is drifting downward
The Signal Processing Toolbox resample function is likely the best option here, at least in part because it uses an anti-aliasin...

oltre 3 anni fa | 0

Risposto
How to set risetime thresholds in stepinfo function
Try something like this — sys = tf([1 5 5],[1 1.65 5 6.5 2]); step(sys) si = stepinfo(sys, 'RiseTimeThreshold',[0 1]) T...

oltre 3 anni fa | 0

| accettato

Risposto
Having trouble finding a row in a table
We do not have ‘a.mat’ to work with. That aside, it may contain a struct (structure array), and if so, the struct2table funct...

oltre 3 anni fa | 1

| accettato

Risposto
How to create a table with a timedate
Try this — dates = datetime('2022-06-01'):days(1):datetime('2022-09-26'); times = {'21h', '24h', '3h', '6h', '9h', '12h', '15...

oltre 3 anni fa | 0

| accettato

Risposto
Remove quotation sign from values in cell
Without knowing more, see if the str2double funciton will do what you want.

oltre 3 anni fa | 1

| accettato

Risposto
I am looking for guidance in how to create multiple subplots based on a third variable
Just saw this now. Try this — Uz = unzip('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1333040/2022WQD%20...

oltre 3 anni fa | 0

| accettato

Risposto
hi, urgent help
I generaly prefer to use the ga (genetic algorithm) function to MultiStart or GlobalSearch because I have a bit more control ove...

oltre 3 anni fa | 0

Risposto
Getting an error message saying I haven't defined optimization variables even though I have
It always helps to check for typographical errors: theraOpt.Objective = (1/size(Xy,1))*(sum(((theta1.*XTrain_Data(:,1)+theta2....

oltre 3 anni fa | 1

Risposto
How to customise Polar Plots
Try something like this — th = linspace(0, 2*pi, 360); r = exp(-0.1*th).*sin(2*th).^2; figure polarplot(th,r) title('Ori...

oltre 3 anni fa | 1

| accettato

Risposto
Make cell arrays the same size for ttest
An acceptable alternative for unpaired data, (and the two vectors having unequal lengths would suggest this), that does not requ...

oltre 3 anni fa | 0

| accettato

Risposto
Remove NaN values from a table
I would not remove the NaN values. The fillmissing function using the 'previous' method might be the best option.

oltre 3 anni fa | 0

Risposto
Generate an exponential signal as seen in figure below.
Include ‘s’ in the complex exponent argument, and multiply the complex vector by a separate real decaying exponential function o...

oltre 3 anni fa | 0

| accettato

Risposto
How to compute the double integral over dx and dy?
You are integrating matrices, so use trapz (or cumtrapz, depending on the result you want) once in each dimension — % clear al...

oltre 3 anni fa | 0

| accettato

Risposto
Errors In User Defined Function for Solving ODE System
You need to tell ode45 what arguments it needs to use: [tSol, XSol] = ode45(@(t,x)ODEsystem(t,x,u,v),t,IC); It only needs to ...

oltre 3 anni fa | 0

| accettato

Risposto
Time normalize kinematic data for gait analyses
Note that ‘i_peaks’ is a (33x1) column vector, That means that: for j=1:size(i_peaks,2) -1 new_angle(:,ci) =interp1(a_hip,...

oltre 3 anni fa | 0

| accettato

Risposto
Search for a value in a table and get the corresponding value from the 2nd column
If you are searching for an exact match, try something like this — Col1 = linspace(0, 10, 21).'; Col2 = randn(numel(Col1),1);...

oltre 3 anni fa | 0

| accettato

Risposto
How can I draw 117 normal 292 abnormal heart sounds?
Drawing them depends on the result you want. Heart sounds are best displayed as time-frequency plots, so I would plot them usin...

oltre 3 anni fa | 0

| accettato

Risposto
How can I integrate this function?
The function as presented appears to be a bit ambiguous, so I’m not certain which (if either) of these is correct. That aside...

oltre 3 anni fa | 0

| accettato

Risposto
How to fit a plot to a set of data points in a log-log scale?
Perhaps something like this — yfcn = @(x,m,q) (1 + (1 - q) .* x .* m).^1./(1 - q); % Objective Function ...

oltre 3 anni fa | 0

Risposto
How to properly create for loop with if statement
It is necessary to use the index on ‘L’ on both sides of the equation. L = -180:20:180 for l = 1:length(L) if L(l) < 0 ...

oltre 3 anni fa | 0

| accettato

Risposto
How to get the surface map better?
Use the contourf function with the jet colormap (the turbo colormap was introduced in R2020b).

oltre 3 anni fa | 0

| accettato

Risposto
Array indices must be positive integers or logical values. I get this error for f(x). How can I fix it?
The current syntax is (outszxide of the Symbolic Math Toolbox) an array indexing operation. Create it as an anonymous functon...

oltre 3 anni fa | 0

Risposto
Why is the line over imagesc not where I expected it to be?
The image functions such as imagesc reverse the y-axis direction. Experiment with: set(gca, 'YDir','normal') to see if tha...

oltre 3 anni fa | 0

Risposto
How do I fit a curve to the peaks of the data?
The approach depends on the result you want from the curve. If you want parameters, then findpeaks or islocalmax will be nece...

oltre 3 anni fa | 0

Risposto
intersection from a plot and loop
clear all; close all W_takeoff = 10000; W_landing=6000; S = 20; AR = 5; cd0 = 0.02; k = 1/pi/AR; RC=0.51; clalpha = ...

oltre 3 anni fa | 0

Risposto
How can I add linspace in a For Loop
There is not enough information (such as a description of what you want to do). However one possibility is something like thi...

oltre 3 anni fa | 0

| accettato

Risposto
Plot a function of three variables on a surface plot
If all the data are vectors (that would appear to be true since ‘x’ is a vector), it would be necessary to use either the gridda...

oltre 3 anni fa | 0

Risposto
How can I animate springs in MATLAB?
One approach — L = 1600; % Vector Lengths t = linspace(0, 16*pi-(1/L), L); ...

oltre 3 anni fa | 0

| accettato

Carica altro