Answered
Logarithmic scale problem in 2D graph
I don’t see anything wrong with the code (however I rewrote the assignment to make it a bit easier for me to understand in the ...

4 years ago | 1

| accepted

Answered
An implementation issue with MatlabFunction
If you want matlabFunction to produce a vector for several arguments, in the 'Vars' argument, enclose them in square brackets to...

4 years ago | 0

| accepted

Answered
How do I extract a specific part of multiple numbers in a vector?
Try something like this — q = [202021031200; 202021031210]; DT = datetime(string(q), 'InputFormat',"yyyyddMMHHmm"); [yr,mo,d...

4 years ago | 1

| accepted

Answered
How to plot of a double integral if error "Matrix dimensions must agree."
Looking at the code, it appears that the intent of the for loop is to iterate over ‘x’ so subscripting it in each itaration appe...

4 years ago | 0

| accepted

Answered
Implementing a butterworth filter for ECG
The approach you tried using that design procedure (thank you for referring to it) will work, and should work regardless of the ...

4 years ago | 0

Answered
Colors above a level is not shown in a contour plot
The straight lines connecting the contours are because of the way the contour matrix (‘M’ here) are formatted. Do something l...

4 years ago | 0

Answered
Trying to plot a vertical line that stops at the intersection of a curved line in Matlab.
Try something like this — % clc % close all % clearvars phi =0:10:80; intstep = (phi(2)-phi(1))/10; %interpolation step ...

4 years ago | 1

| accepted

Answered
How do I determine the peak area with findpeak?
It would help to have an example of your data.. See if the approach in How can I calculate the area under each peak / display ...

4 years ago | 0

Answered
Grab polar intersection point coordinates from a plot
The intersections can be calculated directly from the information provided in the code. Creating a table of them in Cartesian...

4 years ago | 0

| accepted

Answered
How to compute the difference of the integrals of two functions (f(x) and j(x)) only over the portions where f(x)>j(x)
Perhaps this — %Part of no interest for the question (given for the code to run) Tmean_out=30; Tmax_out=40; Tadaptive=32; ...

4 years ago | 1

Answered
How do I highlight a certain area between two lines?
The ‘Time’ format makes absolutely no sense to me, and readmatrix returns NaN for that column, so the posted code image will not...

4 years ago | 0

| accepted

Answered
how to merge two columns(date,time) in .txt file
See my Answer to your other Question in Hi,how do I merge .txt file date and time column?

4 years ago | 0

Answered
Hi,how do I merge .txt file date and time column?
Try something like this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1238782/IMM2211.txt',...

4 years ago | 0

| accepted

Answered
for loop within an odes15 function, and plot on one graph
In order for ode15s not to complain, it will be necessary to supply a vector of 30 initial conditions to the ode15s call. Even...

4 years ago | 0

| accepted

Answered
Calculate daily standard deviation from timetable
Try something like this — DT = datetime('01-Dec-2022 00:00:00') + hours(0:720).'; Temperature = sin(2*pi*(0:numel(DT)-1)/24-0...

4 years ago | 0

| accepted

Answered
Step input applied for different seconds
Experiment with this approach — N = 1500; % ...

4 years ago | 0

| accepted

Answered
Incongruities in InputFormat in datetime
For those sort of formats, use 'uuuu' instead of 'yyyy'. (This should be more thorougly discussed in the documentation to avoid...

4 years ago | 0

Answered
Using for loops to subplot
One approach — x = linspace (1,3600,3600); y = randn(3600, 25); figure for k = 1:size(y,2) subplot(5, 5, k) plo...

4 years ago | 0

Answered
Estimating a transfer function with a given Bode csv data file
Thje input is preferred, however not required. See: iddata, idfrd and related functions, and go from there.

4 years ago | 0

| accepted

Answered
how to smooth or filter the signal like this?
I saved that code. I did not save the non-code text that went with it. I am not certain that I can reproduce the image that ...

4 years ago | 0

Answered
Extract signal values from a data file
I am not certain what ‘identify and match’ means. It is certainly possible to filter the 40 and 75 Hz frequencies individually,...

4 years ago | 0

| accepted

Answered
Obtain the desired orientation without reversing the direction of the two axes
Try something like this — data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1236147/data.txt')...

4 years ago | 0

| accepted

Answered
How do you do a sine transform in Matlab?
In general, a Fourier transform is defined as: where: and its inverse: since apparently is in Hz (or at least not a...

4 years ago | 0

| accepted

Answered
How can convert line plot to bar plot
I have no idea what you want to do. Perhaps something like this — nodeSize=[50 100]; x = rand(3,2); figure hb = bar(x,...

4 years ago | 0

| accepted

Answered
How to determine and adjust the x axis after taking the 1D FFT?
I usually do something like this — t = linspace(0, 100, 10000); % Time Vector s = sum(sin([1...

4 years ago | 0

| accepted

Answered
how to resume GA with saved output in script file
For future reference, consider the approach in How to save data from Genetic Algorithm in case MATLAB crashes? - MATLAB Answers ...

4 years ago | 0

Answered
How to Determine the Cutoff Frequency of Butterworth Low-Pass Filter When Filtering an EMG Signal ?
Use the fft or pspectrum functions to calculate the Fourier transform of the EMG data. Use that result to define the frequencie...

4 years ago | 0

| accepted

Answered
How to determine phase angle of an AC voltage?
Note that ‘v’ is a function of two variables, ‘w’ (that I assume is radian frequency) and ‘t’ (obviously time). The result is a...

4 years ago | 0

Answered
How do I use MatLab to find a line of best fit with a predetermined y intercept using regression.
Perhaps — x = 0:250; y = randn(size(x)); B0 = x(:) \ (y(:)-1) fitline = x(:) * B0 + 1; figure plot(x, y, '.') hold o...

4 years ago | 0

| accepted

Answered
The cutoff frequencies must be within the interval of (0,1).
‘The cutoff frequencies must be within the interval of (0,1).’ Divide ‘fp’ and ‘fs’ by the Nyquist frequency ‘fn’, one-half the...

4 years ago | 0

Load more