Respondida
filling missing value using linear interpolate in 2D
This works — T1 = readtable('GreenhouseData.xlsx', 'VariableNamingRule','preserve') VN = T1.Properties.VariableNames; T1(:,[...

alrededor de 3 años hace | 1

Respondida
readtable with datetime, format problem
‘How do I properly read the date in the dd/MM/yyyy format?’ You need to tell datetime: DateTime = datetime('12/10/2023 00:0...

alrededor de 3 años hace | 1

| aceptada

Respondida
Read from text file between header and footer
One option is textscan — type('data.txt') fidi = fopen('data.txt','rt') C = textscan(fidi, '%f%f%f', 'HeaderLines',3, 'C...

alrededor de 3 años hace | 0

| aceptada

Respondida
How can I solve this nested symbolic function ?
It would be best to abandon the idea of using the Symbolic Math Toolbox here, since it is not necessary. You can do everythin...

alrededor de 3 años hace | 1

| aceptada

Respondida
Can I calculate the settling time in MATLAB?
Perhaps this — s = tf('s'); G = (7507.852*s^3 - 37030.228*s^2 - 70479.368*s + 100001.744) / (s^5 + 50*s^4 + 1000*s^3 + 10000....

alrededor de 3 años hace | 0

Respondida
how to add percentage symbol (%) in a label
The approach seems to work here using synthetic data — % x=table{:,"Xvalues"}; % y=table{:,"Yvalues"}; x = 1:5; y = round(r...

alrededor de 3 años hace | 0

| aceptada

Respondida
Getting an equation from a signal transfer function
‘I would like to get a mathematical expression for that transfer function’ If you have access to the System Identification To...

alrededor de 3 años hace | 0

Respondida
Error using for-loop, keep getting "Index in position 1 is invalid. Array indices must be positive integers or logical values."
The variable and the function have the same names. Change the function name and it works — %% Using single-temperature to p...

alrededor de 3 años hace | 0

Respondida
FFT Analysis Issue: Unexpected Harmonic Multiples in Vibration Signal Frequency Plot
It appears that the fft plot as actually a double-sided fft that the function normally produces. The ‘frequencies’ should pro...

alrededor de 3 años hace | 0

Respondida
Import data from file
This segments some of the file information into 31 individual cells of character vectors . I have no idea what you want from th...

alrededor de 3 años hace | 0

Respondida
make separate table for sets of lat lon that appears x times in a big table.
Use accumarray for this, however we may not be discussing the same file — T1 = readtable('who_ambient_ai...3_(v6.0).xlsx', 'Sh...

alrededor de 3 años hace | 2

| aceptada

Respondida
How to mark points at 1-5 on the x-axis in the plot
One possibility — clc; clear all ; Ld=(0:0.00005:0.005); w=0.001; L=0.007; P=4*0.001; Ta=25; h=375; Kf=175; Kd=0.0...

alrededor de 3 años hace | 0

| aceptada

Respondida
Why won't my plot start 0 and increase to 0.005 like my Ld
It does. It just uses the exponent to scale it. Add these lines: Ax = gca; Ax.XAxis.Exponent = 0; to see the tick labels...

alrededor de 3 años hace | 0

| aceptada

Respondida
Delete rows of excel if any empty cell found
I am not certain how you want to sort the ‘Station’ by ‘shortest to the longest’. Try this — T1 = readtable('datax.xlsx', ...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to graph values of different lengths?
The ‘time’ vector has 10080 elements and ‘EV_power’ has 10230 elements. One way to fix that is to create: time = linspace(0...

alrededor de 3 años hace | 0

Respondida
How I can plot input signal in ode45
Create a second output for ‘u’ (ode45 will ignore it during the integration) and then return it using a for loop after the integ...

alrededor de 3 años hace | 1

| aceptada

Respondida
how to use all the data for a nonlinear regression?
You can only do the regression on complete data rows, so I used the rmmissing function to accomplish that. Try something like...

alrededor de 3 años hace | 1

| aceptada

Respondida
Extract the timing of a specific sound (beep) from an Audio File
It would help to have the file. I assume that the background sounds also contain 300 Hz elements, so unless there is somethi...

alrededor de 3 años hace | 0

Respondida
Plotting variables of continuously array with different colors
You can use either unique or findgroups for this to get serial indices — T1 = readtable('datax.xlsx') [Us,ix1,ix2] = unique(T...

alrededor de 3 años hace | 1

| aceptada

Respondida
why ismember() does not return correct result
They may have very small values that are not shown, especially if they are calculated. Using the ismembertol function will li...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to read txt file and put the words on a vector and the numbers in a matrix?
If that is the exact file, readtable is going to have problems with it. Using fgetl and textscan — type('Alexandre_2023_10...

alrededor de 3 años hace | 1

| aceptada

Respondida
I have two set data and I want to calculate the area in different x and plot the area curve with respect to X
Perhaps this — x=[1 1.5 1.7 2 2.2 2.6 2.8]; y=[0 2 6 7 8 10 5]; int_y = cumtrapz(x, y); figure plot(x, y, 'DisplayName',...

alrededor de 3 años hace | 0

| aceptada

Respondida
Drawing a turning tangent on fitted curve
Perhaps this — xvalue = 20:1:30 yvalue = [56.7 59.8 64.8 66.7 66.2 65.2 64.2 63.5 63.0 62.7 62.5] p = polyfit(xvalue, yval...

alrededor de 3 años hace | 1

| aceptada

Respondida
How to draw a rectangle around the area that shows an energy variation
It would help to have your data. An adaptive approach using contour3 — Fs = 500; L = 300; t = linspace(0, L*Fs, L*Fs+1)/F...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to make the for loop the length as the array inside the for loop?
You do not need the loop at all. Just use the diff function — x1 = [1e6:20000:5e6]; L = 4e6; % in m D_c = 5000;% in m D1 =...

alrededor de 3 años hace | 0

Respondida
Can I create the same FIR filter using two different commands?
Getting the same filter using ttwo differnt methods is probably possible. Comparing a windowed design (using kaiserord here wit...

alrededor de 3 años hace | 0

| aceptada

Respondida
How can I create a bandpass FIR filter using firpm?
I could not get this to work with firpm, since it apparently only works with lowpass filters. Getting it to work with fir1 i...

alrededor de 3 años hace | 1

| aceptada

Respondida
Changing exponential axis scale
I am not certain what the problem is. The approach you took appears to work here (R2023b) — c = 3e+08; % Speed of light in ...

alrededor de 3 años hace | 0

| aceptada

Respondida
How To solve this equation?
One approach — syms x f = symsum(((5*x+2)^(1/5))/x, x, 1, 1E+3) fvpa = vpa(f) .

alrededor de 3 años hace | 0

Respondida
Adding values to a table
One approach (that works) — DateTime = datetime([2020 01 01]) + calmonths(0:5)'; Incidence = randi(10,6,1); tab = table(Dat...

alrededor de 3 años hace | 0

| aceptada

Cargar más