Risposto
Bode Plot to Transfer Function
If you have the System Identification Toolbox, this is (relatively) straightforward, however your data requires a bit of pre-pro...

circa 3 anni fa | 2

| accettato

Risposto
How to identify the month number and year number for one string with moth/day/year format?
Try this — DT = datetime('1/12/2022', 'InputFormat','MM/dd/yyyy') MonthNr = month(DT) YearNr = year(DT) .

circa 3 anni fa | 1

| accettato

Risposto
problem about precision in matlab
If the numbers are all greater than zero, calculate the log of each and compare that. Remember that subtracting logaritms is es...

circa 3 anni fa | 0

Risposto
Choosing Initial values for non-linear fitting and running Genetic Algorithm
V = readmatrix('volt.csv'); Phase = readmatrix('phase.csv'); F= @(a,V) a(1).*(a(2) - a(3) - (a(2).*a(4))./(a(2).^2.*cos(...

circa 3 anni fa | 0

| accettato

Risposto
Display time as Day, Month Year
I experimented with a few conversions, and 'posixtime' is the only one that producs realistic results. Try this — TN = [725...

circa 3 anni fa | 0

| accettato

Risposto
Using interpol 2 code
If you want to upload it, first use the zip function and then upload the .zip file. That aside, see if the Mapping Toolbox in...

circa 3 anni fa | 0

Risposto
Error using strfind Conversion to double from table is not possible.
It is apparently not an actual datetime variable (array). Instead of searching for the ‘T’ occurrences, convert it to datetime ...

circa 3 anni fa | 0

| accettato

Risposto
how do i find the derivative dT/dx at certain coordinates?
Use the gradient function to calculate the numerical derivative. It works with matrices as well as vectors, and getting the der...

circa 3 anni fa | 0

Risposto
Matlab bar chart plotting issue
Recent MATLAB releases can return the (x,y) coordinates of the bar end points. Using those, the result improves considerably ...

circa 3 anni fa | 2

Risposto
how do i use the digital design filter to create a filter for baseline wander in ecg signals?
I would just use the highpass or bandpass functions, iwth the 'ImpulseResponse','iir' name value pair for the most efficient fil...

circa 3 anni fa | 0

Risposto
How to combine 2 Matlab figure plots?
Perhaps — F = openfig('test_combine.fig'); Lines = findobj(F,'Type','line'); for k = 1:numel(Lines) x{k} = Lines(k).XDa...

circa 3 anni fa | 1

| accettato

Risposto
How can a single line plot have two colors?
Use ‘logical indexing’: figure imshow(imread('plot.JPG')) title('Original Function') range = linspace(0,100,500); s_atte...

circa 3 anni fa | 1

| accettato

Risposto
how can I find points in specific cell without 'for' loop?
Without knowing the details of the cell array, the cellfun function is likely the moist appropriate option. It avoids explicit ...

circa 3 anni fa | 0

Risposto
Plotting issue: wrong plotting output when number of rows equals number of columns
Plotting a square matrix may require that the orientation is also specified, for example transposing it. It depends on how the ...

circa 3 anni fa | 0

Risposto
creating cell array using find command
The find function is not necessary in this instance. Use ‘logical indexing’ to accomplish the same result without the find call...

circa 3 anni fa | 0

Risposto
How to envelope a FFT dataset?
It depends on what you want to do. The Signal Processing Toolbox has the envspectrum function that can do this, however the si...

circa 3 anni fa | 0

| accettato

Risposto
skip items in a legend
Perhaps this — x = 0:10; y1 = randn(size(x)); y2 = randn(size(x)); y3 = randn(size(x)); figure hp1 = plot(x, y1, 'Displ...

circa 3 anni fa | 2

| accettato

Risposto
ODE for frequency response
This takes a while to run, so I used relatively coarse mesh intervals (for ‘tspan’ and ‘omega’) to run it here. Experiment wi...

circa 3 anni fa | 2

| accettato

Risposto
How to draw yline on yyaxis on right hand axis?
I don’t have your data, however in this simulation it seems to work correctly — x = 0:10; y1 = randn(size(x)); y2 = randn(s...

circa 3 anni fa | 0

| accettato

Risposto
Is there a way to fit experimental data to a set of x,y points?
Hankel functions are new to me, so I looked this up. Wolfram MathWorld a has a description: ...

circa 3 anni fa | 0

| accettato

Risposto
How do I access sub-columns in table
Try this — I = [1 2 3; 1 2 3;1 2 3]; J = [4 5 6;4 5 6;4 5 6]; K = table(I,J) VN = K.Properties.VariableNames; I1 = table...

circa 3 anni fa | 0

Risposto
plot3 command error in dlode45
The problem is that ‘y’ is a dlarray (the first time I’ve encountered one so I need to start working with the Deep Learning Tool...

circa 3 anni fa | 1

| accettato

Risposto
converting indices into time
Try this — F = openfig('figure1.fig'); Lines = findobj(F, 'Type','line'); tidx = Lines.XData; speed = Lines.YData; Fs = 3E...

circa 3 anni fa | 0

| accettato

Risposto
How to save user input as variable I can compare?
The ‘data’ values are geing read correctly, however the second ‘data’ assignment is overwriting the first one. Perhaps: da...

circa 3 anni fa | 0

| accettato

Risposto
Can I use ismembertol to find x,y coordinates that are close to each other?
The best approach to find (x,y) pairs that are close to each other is probably to use pdist2. You can then compare the distance...

circa 3 anni fa | 0

Risposto
Problem in plotting the convolution
Use the 'same' argument so that the output is the same size as the input: yt= conv(xt , ht, 'same'); This works — dt= 0.000...

circa 3 anni fa | 0

| accettato

Risposto
Problem adding labels to figure
One problem is that just after creating the figure the code clears it. Otherwise perhaps something like this — fig=figure(3...

circa 3 anni fa | 1

| accettato

Risposto
How can i plot sections of a horizontal line?
One approach — t = linspace(0, 15, 150); v = ones(size(t)); G{1} = (t >=3 & t<=4); G{2} = (t>=14 & t<=15); K{3} = (t>=7 & ...

circa 3 anni fa | 1

| accettato

Risposto
Directed transfer function (DTF) calculation for EEG data
The Wikipedia article on Brain connectivity estimators provides a llink to HERMES that apparently can be downloaded (I have no r...

circa 3 anni fa | 0

Risposto
add text to the axis
Perhaps this — t = 0:24; y = rand(3,25); figure plot(t, y) grid text([13 6 18], zeros(1,3), {'noon','sunrise','sunset'}...

circa 3 anni fa | 0

| accettato

Carica altro