Answered
Convert a time column of yyyymmddHHMM to yyyy-mm-dd HH:MM
Perhaps — vn = 200701010130; vs = num2str(vn) vd = datetime(vs, 'InputFormat','yyyyMMddHHmm', 'Format','yyyy-MM-dd HH:mm') ...

4 years ago | 0

| accepted

Answered
How to implement numerical solvers
The function needs to be changed so that it accepts one vector of parameters (‘b’ here) and produces a scalar value for ‘S’. Ju...

4 years ago | 0

Answered
Is it possible to make a ddefun with a changing variable that will run in a for loop?
Please do not use global variables. Pass them as extra parameters as described in Passing Extra Parameters. I made that change...

4 years ago | 0

Answered
converting a second degree differential equation into a first order
Declare all the variables, and for good measure, return the second output from odeToVectorField because it tells you wnat the fu...

4 years ago | 0

| accepted

Answered
Argument to dynamic structure reference must evaluate to a valid field name.
Typographical error. The single . is generating the error. V_c =2.*pi.*x10.((R-x9).^2 - x1.^2) + pi.*L.*(R.^2 - (R-x9).^2)...

4 years ago | 0

| accepted

Answered
Unable to plot transfer function properly by using step(tf,array)
I do not usually post multiple answers to the same question, however my original answer is in the process of being sabotaged, so...

4 years ago | 0

| accepted

Answered
Need help designing stopband filter
Thank you for quoting my code! The FIR filter will eliminate both frequencies in one filtfilt call to it, however they are no...

4 years ago | 0

| accepted

Answered
axis off sets background color back to white despite set(gca....
If the desired result is simply to make the axes invisible, perhaps using the Axes Properties XColor, YColor, and ZColor values...

4 years ago | 0

Answered
Z-Transform of numerical test data
Data are data. They exist as discrete elements in computers because (except for signal-level internal voltages and currents in ...

4 years ago | 0

| accepted

Answered
Code not working?
It plots correctly if ‘f_f’ is defined correctly. The middle value for colon-operator generated sequences is the ‘step’ value, ...

4 years ago | 1

Answered
Unable to plot transfer function properly by using step(tf,array)
It may not be the desired result (I have no way of knowing what that is), however it appears to be exactly what step was asked t...

4 years ago | 0

Answered
How do I count certain values within a column of a table?
One approach — MajorAxisLength = 30*rand(15,1) Lv = (MajorAxisLength >= 5) & (MajorAxisLength <= 26) MeetCriteria = nnz(Lv...

4 years ago | 0

Answered
Can matlab 2012b run on windows 11?
No. Only R2021b and later releases support Windows 11. See Platform Road Map for the MATLAB and Simulink Product Families ,...

4 years ago | 0

| accepted

Answered
Pulling certain data from a text file into Matlab with strsplit
Try something like this — % opts = weboptions('ContentType','text'); % M = webread('https://www.mathworks.com/matlabcentral...

4 years ago | 0

Answered
How to fit data!
This is something similar to Curve Fitting of large Data Measurement? however with a different sort of envelope. I would begin ...

4 years ago | 0

| accepted

Answered
How to group data according to date in years?
Since 'dayofyear' won’t work, break the dates down into two new variables, specifically the day and the month, then group on the...

4 years ago | 1

| accepted

Answered
How to label the farthest x point
Consider perhaps ... v0=75;%initial velocity of 75m/s g=9.81;%force of gravity 9.81 m/s^2 theta=[0:(pi/100):(pi/2)]; %values...

4 years ago | 0

Answered
High-precision IFFT
Since it appears that these calculations are all symbolic, one option would be the ifourier function, or if you are using your o...

4 years ago | 1

| accepted

Answered
How to calculate Area under a curve (negatif side)
I went with the patch function because I’m more familiar with it. Try ths — f = [-0.390930468901234 -0.346778353936444 -0.3...

4 years ago | 1

| accepted

Answered
how to calculate wavelength of texture ?
Consider using the smoothdata function to eliminate the high-frequency noise. After that, first, use the detrend function to re...

4 years ago | 0

| accepted

Answered
Curve Fitting of large Data Measurement?
Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/871405/Measurement%20Data.xlsx', '...

4 years ago | 1

| accepted

Answered
How do you solve this on matlab
I would use the null function.

4 years ago | 0

Answered
I want to write this transfer function (0.7/s^2)*sin(0.05) in MATLAB code, but sine make it complicated. Kindly, how can I make that?
Since the sin call creates a constant and is not itself a function of ‘s’, evaluate it first and then just multiply it as with a...

4 years ago | 0

| accepted

Answered
About Adding Lines to Your startup.m file
See the documentation on startup I believe that it now has to be in (Windows machines): C:\Users\<UserNAme>\Documents\MATLAB...

4 years ago | 0

Answered
error with changing color of marker using scatter3
This is the best I cand o. See Plot Table Data with Custom Marker Sizes and Colors for a more extensive discussion. Tabl...

4 years ago | 0

Answered
How to convert time column into a regular array?
If the time series are a datetime array, they can easily be plotted as funcitons of that variable. It would be best to convert ...

4 years ago | 0

| accepted

Answered
Loop to replace outliers with NaN extremely slow
The way the table addressing is coded is likely the problem. I’m not certain, however using parentheses () addresses the tabl...

4 years ago | 0

| accepted

Answered
Average of two dataset
I cannot reproduce that problem here (R2021b). However, to compare all values for both curves, the (x1,y1) values need to be ...

4 years ago | 0

| accepted

Answered
I cannot extract data from syms surface plot: Struct contents reference from a non-struct array object
I can’t run the posted code because there are missing elements. Neverhteless, everything necessary to extract the data and re...

4 years ago | 0

| accepted

Answered
can't find line of best fit from simple code
The first argument to plot must be the independent variable vector. When I added that, it works! (I broke out the polyval ca...

4 years ago | 0

| accepted

Load more