Beantwortet
How can i find the co-ordinates of a point where the slop is -1 in below graph ?
Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1285050/cmos.txt', 'VariableNamingRu...

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
Improve part of code using a loop
One approach — date_time = (datetime('01-Jan-2023') : caldays(1) : datetime('31-Dec-2023')).'; Values = randn(numel(date_time...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot 2 columns (one is population the other is years) in a linear graph
This is difficult without the Excel file. Taking a wild guess: plot(Population.years, Population.Population) alternatively...

mehr als 3 Jahre vor | 0

Beantwortet
Unclear periodicity output with daily temperature dataset using periodogram
I have no idea what temperature is being measured. I would expect environmental temperatures to have a significantly wider rang...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why is my FFT diagram has a slope approaching to zero?
It looks correct to me. I made three changes: indexing into the table and references to it, subtracted the mean from ‘S’ since ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Filtering between frequency range
The function you use depends on how you want to filter them. The filtering functions (includijng filtfilt) operate column-wise ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Adding scatter points to a contour plot
‘Highest’ usually implies one value, not 67, and without your data (the (67x67) matrix) and understanding what the ‘highest 67 v...

mehr als 3 Jahre vor | 0

Beantwortet
For each peak, I would like to calculate the delta (shown in image) for the plot in the script at each threshold level in a table.
@Rufus Adjetey — Try my code — X = [0.0318400000000000,0.0368000000000000,0.0417600000000000,0.0467200000000000,0.0516800000...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to locate X value for a given Y value
In the absence of the data, getting an independent variable valuex ‘x’ from an dependent variable value ‘y’ is relatively straig...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I make a bar graph from uneven arrays without adding zeros to the end of the smaller array?
I am not certain what you want. This approach creates a NaN matrix with the column length of the larger vector, writes the or...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Convenient way to filter sinusoidal noise from decay data?
If you want to use a frequency-selective filter, first do a fft of the data to determine the frequency components, then use the ...

mehr als 3 Jahre vor | 0

Beantwortet
How can I get a smooth curve in MATLAB?
One option is to interpolate to a finer ‘x’ vecttor, and then use a method such as 'pchip', 'spline', 'makima', or others to do ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Cannot add shaded confidence intervals?
We do not have your data. The fliplr function will not produce the desired result with column data. I prefer to use the patc...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to use the data from a .mat file to make a graphic?
Use the load function to ‘read’ the .mat file. (I always load into a variable as a structure of the .mat file contents so that ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
A way to write "if x is in y matrix do this"
It depends what the random number is, and how you define ‘y’ . The ismember function works for exact comparisons. The ismember...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I delete a specific row from a timetable?
Try something like this — LD = load(websave('TimeTable','https://www.mathworks.com/matlabcentral/answers/uploaded_files/127871...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to transform a second order ODE to the format xddot=A.X+B.U
See if using odeToVectorField and matlabFunction will do what you want. Those should work if you want to solve them using the...

mehr als 3 Jahre vor | 0

Beantwortet
Convert uint8 vector to float
Since you apparently know the mapping, one option is to simply calculate a linear regression (assuming that a linear relation ex...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How do I plot horizontal time intervals and ignore others to produce a non continous dashed line plot?
Try this — tTime =[0.0547083333333333 0.0553541666666667 0.0587500000000000 0.0599375000000000 0.0632291666666667 0.0646458333...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to change a single xtick (x label)?
Perhaps something like this — x = 1:100; y = rand (100); figure plot(x,y) xt = xticks; xticklabels([{'No Stim'} compose...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
find a tangent values from plot
I am not certain what tangent (slope) you want. I am assuming it is from (0,0) to where the tangent line touches each parabols....

mehr als 3 Jahre vor | 0

Beantwortet
Best way for finding transfer function in time domain
If you want to create a filter from it (returning numerator and denominator coefficient vectors), use the Signal Processing Tool...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to define the location/position of a number in a specific cell array?
It would help to have the actual cell array. Try something like this — MY = {[]; []; []; 1; []; []; []} loc = find(cellf...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I plot this X and Y data?
Perhaps something like this — LD = load(websave('Tide_Data','https://www.mathworks.com/matlabcentral/answers/uploaded_files/12...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to separate a large text file into individual text files based on date, but also export headers?
Try something like this — files = {'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1276100/Gwynedd_1991.txt';'...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Is the window function automatically used when doing the fft function, or do I have to enter code to use the window function?
The fft defaults to a rectangular window that is the length of the signal. That is the only one that is ‘autoomatically’ used. ...

mehr als 3 Jahre vor | 0

Beantwortet
Creating sounds with changing amplitude
Try this — Fs = 44100; Ft = 440; sec = 2; t = linspace(0, Fs*sec*60-1, Fs*sec*60).'/Fs; % ChkFrq = 1/t(2) s = sin(2*pi*Ft...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to interpret results of FFT/DFT?
The time vector needs to be scaled correctly if the frequency vector is to be correct. Try this — T1 = readtable('https://w...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Plot a graph from arrays
Try something like this — hv = [0,2,4,6,8]; Xm = [ {[54.8765]} {[15.8544]} {[55.3118]} {[19.0629]} {[55....

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Logical operator not evaluating correctly
Only two comparisons are actually required here — X = linspace(-7, 7, 15); Y = -(X < -5) + (X > 5); Check_Result = [X; Y] ...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden