Answered
Concatenate 2/more graphs into 1 graph
I do not have your files, however this is straightforward — t1 = linspace(0, 10, 250); signal1 = randn(size(t1)); t2 = linsp...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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 — ...

3 years ago | 0

Answered
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...

3 years ago | 0

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 1

| accepted

Answered
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...

3 years ago | 0

| accepted

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

3 years ago | 1

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

Answered
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....

3 years ago | 1

Answered
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...

3 years ago | 1

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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.

3 years ago | 0

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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 ...

3 years ago | 0

| accepted

Answered
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,...

3 years ago | 0

| accepted

Answered
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);...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

| accepted

Answered
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 ...

3 years ago | 0

Answered
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 ...

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

Answered
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...

3 years ago | 0

Answered
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...

3 years ago | 0

Answered
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 = ...

3 years ago | 0

Answered
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...

3 years ago | 0

| accepted

Answered
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...

3 years ago | 0

Load more