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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

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

mehr als 3 Jahre vor | 0

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

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
differentiate between month in dataset.
Perhaps something like this — secondsperyear = 60*60*24*365; DT = datetime(2023,1,1,0,0,0) + seconds(0:secondsperyear-1).'; ...

mehr als 3 Jahre vor | 0

Beantwortet
To obtain the cumulative signal power spectrum from the single-sided spectrum of a biomechanical signal to identify the frequency under which 99% of the signal power is
I cannot find a time vector or sampling frequency. I need at least one of those. The article is open-source, however not ill...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Using rlocus I am confused
You appear to be overthinking it. Try this — G = tf([1 1], conv([1 2 2], [1 2 5])); figure rlocusplot(G) grid % title...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
nlarx is not working at all
Check to see if you have another function (or something else) with the same name. To do that, run this: which nlarx -all f...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why am I getting the same colour of the legend for the last 2 plots?
I suspect that it is because ‘y2’ has more than one row. The solution is to return the handles of the plots, and select only ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Choosing dimension for filter
I believe so. From the filtfilt documentation for x: ‘The function operates along the first array dimension of x unless x i...

mehr als 3 Jahre vor | 0

Beantwortet
How to draw the delta signal in matlab
The function normally will not plot in MATLAB because it has infinite amplitude and infinitesimal width. So it is necessary ...

mehr als 3 Jahre vor | 0

Beantwortet
Problem during the use of 'fzero'
I am not certain what you want to do. I suspect that you want to loop over varying values of ‘t’ however ‘t’ never appears as...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Extracting datetime and adding reference time
This was a bit more involved than I theught it would be — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uplo...

mehr als 3 Jahre vor | 0

Beantwortet
3 subplots with the bottom one split in 2 vertically?
Perhaps this — clearvars x = -10:0.01:10; y = cos(x); figure(1) subplot(2,2,[1 2]) plot(x, y) subplot(2,2,3) plot(x,...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why is my "plot" function not working?
Use the str2double function on the last four variables. EDIT — (26 Mar 2023 at 10:28) T = readtable('https://www.mathworks...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
what test to use on z-scores
Since the zscore is simply a standardised method of expressing data, and if the mean values and standard deviation (std) values ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Using the surf and meshgrid command
I am not certain what function you want to plot, since you did not create ‘z’ as a separate matrix. (I am creating it here in p...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I save a data in my excel to matlab folder, i e how do i create a path to matlab folder
I am not certain whether you want to read from the Excel file or write an Excel file from data you have created. Depending on...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Displacement from acceleration measurements
The slopes are due to a constant that is being integrated can be removed by subtracting the mean of the variable to be integrate...

mehr als 3 Jahre vor | 0

Beantwortet
Change rlocus() axis units to Hz?
First, use rlocusplot since it allows options — sys = tf([2 5 1],[1 2 3]); hrlp = rlocusplot(sys); opts = getoptions(hrlp) ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Problems with signal processing
For a time-frequency plot, I would use the pspectrum function with the 'spectrogram' option, at least for an initial approach, a...

mehr als 3 Jahre vor | 0

Mehr laden