Answered
How can I find the matrix where column should be specific value?
Use ‘logical indexing’ — A = rand(15,2); B = A(A(:,1)>= 0.5 & A(:,1)<=0.512, :) Experiment with this with your matrix. .

3 years ago | 0

Answered
Converting probability distribution plot into a histogram
It would definitely help to have more information, and specifically the code and data that created that plot, in order to experi...

3 years ago | 0

Answered
Curve smoothing in MATLAB
One option would be a lowpass filter, assuming that the independent varialb is regularly sampled. First, calculate the Fourier ...

3 years ago | 0

Answered
Measure wavelength of a signal using PSD
Try this — figure imshow(imread('Screenshot 202... 16.25.00.png')) T1 = readtable('stan.xlsx') stan_18p3 = T1.stan_18p3; ...

3 years ago | 0

| accepted

Answered
Unable to change the height of the barh.
The tiledlayout plots will not let you do that, however subplot will. Try this — figure y=[67 147-67 1073-147 3456-1073 50...

3 years ago | 0

| accepted

Answered
Why is my code producing a 0's at the 11th Column
Could it be because that is how you defined it? xi = 0.01:0.01:0.2; pe = linspace(1,1.5,100); p = zeros(length(xi),length(p...

3 years ago | 1

Answered
Creating a custom plot layout with data from multiple sources
I am not certain what you want to do. See if the animatedline function will work.

3 years ago | 0

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

3 years ago | 2

| accepted

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

3 years ago | 1

| accepted

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 2

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

3 years ago | 0

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

3 years ago | 1

| accepted

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

3 years ago | 1

| accepted

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

3 years ago | 0

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

3 years ago | 0

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

3 years ago | 0

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

3 years ago | 0

| accepted

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

3 years ago | 2

| accepted

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

3 years ago | 2

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

| accepted

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

3 years ago | 0

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

3 years ago | 1

| accepted

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

3 years ago | 0

| accepted

Load more