Answered
delete consecutive commas in txt file
Use readmatrix with additional name-value pair arguments to select the delimiter and combine multiple consecutive delimiters. S...

4 years ago | 1

| accepted

Answered
How to plot multiple curves on the same screen for different values of "b" with bvp4c solver?
The problem is that the initial conditions are uniformly zero, so any change in ‘b’ will not be evident since the entire result ...

4 years ago | 0

| accepted

Answered
How can I compute the Area and the Centroid of the following shape?
The polyshape approach is the easiest way to go on this. However it is possible to calculate this using the trapz function an...

4 years ago | 2

| accepted

Answered
How to know the x projection in this function if the y is known?
Use interp1 to interpolate — xA = 0; xB = 1; xf = 1; x = linspace(0, xf, xf*1e4 + 1); a = 9.2; % c = 0.5; % cen...

4 years ago | 1

| accepted

Answered
Functions only plotting out to x=5
To plot from 0 to 10, change the fplot call to: fplot(y,[0 10]); Then it works without further modification — syms t C1 C2;...

4 years ago | 0

| accepted

Answered
How should I plot the function (sqrt(1 + x) - 1) / x using the values x = 0.1, 0.01, 0.001, ..., 10^-20?
Using the logspace function to create the independent variable ‘x’ vector makes this easier. Plot it as a function of the in...

4 years ago | 0

Answered
filtering excel commands in matlab
I have no idea what you want or the reason a 3D matrix is necessary. A different approach using unstack — T1 = readtable('h...

4 years ago | 0

Answered
print to screen with fromat
Using only the posted data — C = {1 '10-Sep-2022 09:16:46' 45.000 3.000 1.000 3.850 5.200 11.250 9.300 -0.04...

4 years ago | 0

| accepted

Answered
Solving system of two (non)-linear eqautions multiple times using a for loop
I am not certain what the problem is, however putting square brackets [] around the variables you want to solve for may do what ...

4 years ago | 0

| accepted

Answered
Movavg function doesn't compute values for the entire timeseries
Use the fillmissing function — LD = load(websave('august_filtered_data','https://www.mathworks.com/matlabcentral/answers/uploa...

4 years ago | 0

| accepted

Answered
denoise non stationary signal
I have nothing against using wavelets to denoise a signal, however I generally find the sgolayfilt function useful in eliminatin...

4 years ago | 0

| accepted

Answered
plot a time series data
Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1120695/sample.csv', 'VariableNaming...

4 years ago | 0

| accepted

Answered
how to draw a cube with planes
This is generally how to draw the patch plots in 3D. You organised them well, however they still need a bit of revision to pl...

4 years ago | 1

| accepted

Answered
How do you integrate a very long equation on MATLAB?
Use the vpaintegral function — syms x y = 0.5+x^0.6532; %incremental surface yuse = sqrt(1+(diff(y))^2); %pressure along t...

4 years ago | 0

Answered
Inconvenience working with matlabFunction
I responded to your original post and Comment. Reposting here — This is an application of passing extra parameters. As suc...

4 years ago | 0

| accepted

Answered
Inconveniences working with matlabFunction
The reshape argument simply takes the vector of argumentsin the square brackets [] and creates a matrix from them, as required. ...

4 years ago | 0

| accepted

Answered
How to chop up/segment a periodic signal?
This approach takes advantage of the fact that the Q-T interval in a normal EKG is less than one-half the previous R-R interval....

4 years ago | 0

| accepted

Answered
How to convert column datetime (yyyy-mm-dd HH:MM:DD.000) into MJD and decyear?
The mjuliandate and decyear functions are part of the Aerospace Toolbox (that I do not have, however is available online here) —...

4 years ago | 1

| accepted

Answered
How to not use for loop
Try something like this — format compact a = randn(2, 1) x = linspace(-1, 1, 20) % equispaced x f = a(1) + a(2)*x ...

4 years ago | 0

| accepted

Answered
How can I find numbers>30 in 810*1 matrix?
This is similar to the approach with the months — V = randi(50, 10, 1) Vgt30 = V(V>30) .

4 years ago | 0

Answered
how to find the maxpeak of an fft signal in a specific range?
Try something like this — FT = fft_result; Fv = frequency_vector; [pks,locs] = findpeaks(abs(FT)); Flocs = Fv(locs); ...

4 years ago | 0

Answered
Please tell me how to erase meaningless lines from graphs!
There is no need to discard any data. Just use sortrows to sort them — LD = load(websave('data','https://www.mathworks.com/ma...

4 years ago | 0

Answered
How can I select or extract rows?
It depends on what the data are (for example, datetime arrays). Given the problem described — Months = repmat(ones(3,1) * (...

4 years ago | 0

| accepted

Answered
Filter characteristics of smoothdata function ?
‘So is using freqz or fvtool the right way to approach this problem?’ No. The freqz function wants filter coefficients. T...

4 years ago | 0

| accepted

Answered
Need help finding out if I wrote this code correctly
If you want to save the values of ‘pn’ in the loop, subscript it — pn(M) = 1-(1-((n-1)/N)); That will create a row vector tha...

4 years ago | 0

Answered
How do I use specific columns from a csv file
I am not certain what you want to regress. Perhaps one of these — fvc = readtable('https://www.mathworks.com/matlabcentral/...

4 years ago | 1

| accepted

Answered
How to simulate Poisson Distribution Process?
See if the poissrnd function will do what you want — lambda = 3; v = poissrnd(lambda, 1, 60) .

4 years ago | 3

| accepted

Answered
Plotting data on binary axis and draw lines between points
Perhaps something like this — x1 = [2.6, 1.5, 1.4, 0.8, 3.2]; y1 = [0.001, 0.9, 0.2, 0.5, 0.3]; figure hs = scatter([1 ...

4 years ago | 1

| accepted

Answered
How to extrapolate the data
Another approach — load(websave('DATA','https://de.mathworks.com/matlabcentral/answers/uploaded_files/1117125/DATA.mat')); %%...

4 years ago | 0

| accepted

Answered
Printing out proper equation statement using fprintf.
If you want ‘fa’ to be a function (outside of the Symbolic Math Toolbox) it needs to be careated as an anonymous function: fa ...

4 years ago | 0

| accepted

Load more