Beantwortet
I've tried using MATLAB R2023b to generate bode plots and calculate DC gains of transfer function but I keep on receiving an error message: 'Wrong number of input arguments'
Wrong syntax. Use the tf function, not syms for Control System Toolbox functions. Try this instead — s = tf('s'); b =...

mehr als 2 Jahre vor | 0

Beantwortet
Spectral Analysis of Water Wave Gauge Data
It would help to have the data. Be certain that the independent variable data are regularly sampled, so that the sampling fre...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
plot sine wave with exponent
I am not certain what you are asking. Try this — L = 30; % Signal Length (s) Fs =...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
How to convert specified time to GMT/UTC?
Try this — DT = datetime({'18-Oct-2023 17:40:00' '18-Oct-2023 18:00:00'},'TimeZone','+05:00') DT_UTC = DT; DT_UTC.TimeZon...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
error multiplying datetime (now) by 100 with *
I don’t understand summing a constant — sum(100) That aside, if you want to create a random datetime for a specific parti...

mehr als 2 Jahre vor | 0

Beantwortet
problem plotting from function call
In general, global variables are not considered good programming practice, principally because the functions they are passed to ...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
rotate 3D data
Use the rotate function. It will likely require a bit of experimenting to get it the way you want it. Example — imshow(imr...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
How to inclusively extract rows of a large cell array between cells given start and end patterns?
type('sample_input.txt') fidi = fopen('sample_input.txt','rt'); k = 1; while ~feof(fidi) Line{k,:} = fgetl(fidi); ...

mehr als 2 Jahre vor | 1

| akzeptiert

Beantwortet
How I get area under the curve (AUC) value
The file is not provided, however it is not absolutely necessary for this. Try something like this — D = 0.1*randn(6,12000)...

mehr als 2 Jahre vor | 0

| akzeptiert

Beantwortet
How to group xlines in legend
Using plot to plot the vertical lines is straightforward — ax = axes; % p = xline(ax, [1 2 3], "g-"); p = plot([1;1]*[1 2 3...

mehr als 2 Jahre vor | 0

| akzeptiert

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

mehr als 2 Jahre vor | 1

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

mehr als 2 Jahre vor | 1

| akzeptiert

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

mehr als 2 Jahre vor | 0

| akzeptiert

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

mehr als 2 Jahre vor | 1

| akzeptiert

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

mehr als 2 Jahre vor | 0

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

mehr als 2 Jahre vor | 0

| akzeptiert

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

mehr als 2 Jahre vor | 0

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

mehr als 2 Jahre vor | 0

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

mehr als 2 Jahre vor | 0

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

mehr als 2 Jahre vor | 0

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

fast 3 Jahre vor | 2

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

Beantwortet
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', ...

fast 3 Jahre vor | 0

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 0

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

fast 3 Jahre vor | 1

| akzeptiert

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

fast 3 Jahre vor | 0

| akzeptiert

Mehr laden