Réponse apportée
Modeling Friction in State Space
The Laplace transform of the signum function is 2/s. Therefore, you can derive your system equation in "s" domain: b_c * sign(x...

environ 3 ans il y a | 0

Réponse apportée
why is my plot not showing a line?
Your code produces only scalar value for the variables ash shown in your screenshot from the workspace to be plotted: efficienc...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
why is my plot not showing a line?
The error tells that gas = IdealGasMix('air.xml') is not importing the data. IdealGasMix() is a function to read a data from *...

environ 3 ans il y a | 0

Réponse apportée
Plotting graphs in LiveEditor turn tabs blank
This might happen when you have generate very high resolution plots (graphices), in particular 3D plots, e.g., using mesh(), sur...

environ 3 ans il y a | 0

Réponse apportée
How to Work with seperate function files?
Your problem statement says do not define a, r, n inside the function file. That means that these variables need to be input var...

environ 3 ans il y a | 0

Réponse apportée
Concatenate rows into a table using a for loop with app designer
Maybe you can try this approach: for jj=1:5 for ii = 1:10 M(jj,ii) = randi([-10, 10],1); end end M_tab = array2table(M...

environ 3 ans il y a | 0

Réponse apportée
How to make a custom slider to adjust theta?
(1) Copy and paste your code into MLX-editor (2) Bring your cursor before theta (3) Click on the LIVE EDITOR Pane (4) Click o...

environ 3 ans il y a | 0

Réponse apportée
How to move a marker along line in polar coordinate
Here it is: clear; theta = -pi/4:0.001:0; % cosine of 2*theta will be positive for this range r = -sqrt(cos(2*theta)); figur...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Why do I receive the error '' Too many input arguments" ?
Have you tried this sytax: ... mget(ftpobj,'filename.txt', 'myLocalFolder');

environ 3 ans il y a | 0

Réponse apportée
hwo to copy file
There are a couple of points which were not consistent. Here is the corrected code. clc SourceF = 'trial.csv'; y = readtabl...

environ 3 ans il y a | 0

Réponse apportée
How to move a marker along line in polar coordinate
Here is the corrected plot that animates a marker. clear; theta = -pi/4:0.001:0; % cosine of 2*theta will be positive for this...

environ 3 ans il y a | 0

Réponse apportée
Plot the amplitude and phase response for the given FIR system.
Use tf() and bode(): z = tf('z',0.1); H = (4*(z^-2)-2*(z^-1)+1) /1 bode(H)

environ 3 ans il y a | 0

Réponse apportée
Concatenate rows into a table using a for loop with app designer
Note that if you need to update the content of the table, then you should use one of these approaches: (1) Update the table: A...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to Work with seperate function files?
Here is one M-file that calls and executs built-in fcn file in it. Note in the defined fcn file called geosum1 there is an err, ...

environ 3 ans il y a | 0

Réponse apportée
How can I add Greek character with subscript in the title of my figure?
An alternative way is: load('POFDE.mat'); data = cell2mat(POFDE); [lat,lon] = meshgrid(unique(data(:,1)),unique(data(:,2))); ...

environ 3 ans il y a | 0

Réponse apportée
How can I add Greek character with subscript in the title of my figure?
Here is how you can add subscripts with Greek letters: load('POFDE.mat'); data = cell2mat(POFDE); [lat,lon] = meshgrid(unique...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
plot ''markers'' in graph
If understood your question correctly, this is what you are trying to do: t = 0:.1:3; % Time Data = exp(2*cos(t)...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
I am trying to disallow the user from inputting non-sense answers.
You can try using ischar(), e.g.: A = input('Enter square matrix: '); if ischar(A) error('Wrong entries') else dis...

environ 3 ans il y a | 0

Réponse apportée
what is magnitude of amplitude in real world?
Here in your exercise the amplitude is ~0.1 - see e.g.: fs=1000; % 1kHz fv=200; amplitude=0.1; t= 0 : 1/fs :10; y= amplitud...

environ 3 ans il y a | 0

Réponse apportée
I am struggling with letter b and keep getting this as an error. Variable b must be of size [1 1]. It is currently of size [3 4]. Check where the variable is assigned a value.
One typo B instead of b in computing max of log10(B): A = [11.3 25.4 -58.6 66.2 82.8 37.9 41.5 3.6 60.7 14.2]; B = [1.256 3....

environ 3 ans il y a | 1

Réponse apportée
Finding best fit function for a data set
You can try cftool - curve fitting toolbox, or use fit(), e.g.: D = readmatrix('Samples_Data.xlsx'); X = D(:,2); Y = D(:,3); ...

environ 3 ans il y a | 0

Réponse apportée
why am i getting error with this code?
Without looking at your data, it is diffiuclt to address your question properly. Thus, pl., post your sample data.

environ 3 ans il y a | 0

Réponse apportée
How do I plot the trajectory of an object given time (s), initial velocity (m/s), and angle?
Heres is a nice code proposed by Jan: https://www.mathworks.com/matlabcentral/answers/308853-how-do-i-create-a-projectile-motio...

environ 3 ans il y a | 1

Réponse apportée
How to Plot a 3D Waterfall Plot given X, Y, and Z datasets
Use meshgrid() and waterfall() fcns, e.g.: Length = (1:181).'; Steps = (1:556)'; [X,Y] = meshgrid(Length, Steps); Z = X.^2+Y...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Plot Different Line Styles using a for loop plot
Here is how you can get this plot: clf; close all L=0:100; L_bar = 25; sigma_d = 0.25; %[0.25, 0.5, 0.75, 1.0]; % How the di...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to make a line-plot? Time series
Here is one of the possible solution codes: table_a = readtable('Data1.xlsx'); table_a.schoolyear = table_a.year; table_a.sch...

environ 3 ans il y a | 0

Réponse apportée
I have simple divisions between integers and I always get another integer as the answer. But I want at least three decimal places. I am using MATLAB R2022b
Use format. E.g.: B = 1; C = 5; A=B/C format short A format long A format bank A format rat A format long g A

environ 3 ans il y a | 0

Réponse apportée
why is my ea not being recognized?
There are a few inconsistencies. (1) The simulation in [for ... end] loop never reached due to if condition f(xl)*f(xu) <0. Th...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How to align multiple signals?
Here is one of the viable solutions to compute resonant frequencies of each signal and find out if their are coherent: S1 = loa...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Index in position 1 is invalid. Array indices must be positive integers or logical values
There are a couple of inconsistencies that cause this problem in the code: % currentColumn = currentColumn - 1; % Return to b...

environ 3 ans il y a | 0

Charger plus