Réponse apportée
Can I issue a command to see when my license expires?
<https://www.mathworks.com/matlabcentral/answers/302548-how-can-i-check-the-expiration-date-of-my-matlab-license Check this answ...

environ 6 ans il y a | 0

Réponse apportée
mod(a,b) floating-point rounding error
x(3,121) is not exactly 0.2. It is slightly less than 0.2. That is why when Matlabs mod() function does its algorithm, which is;...

environ 6 ans il y a | 0

Réponse apportée
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 11-by-11.
Here is the problem; DpiE(i,j)=DPiIX/DtX Both DPiTX and DTX are 11x1 vectors. When you divide 11x1 with 11x1 Matlab thin...

environ 6 ans il y a | 0

Réponse apportée
MATLAB Being Helpful hah:
What is the question? I assume the question is why the answers are different. Answer is simple 10e-12 is not equal 10^-1...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to extract the exponential term?
Here is one way; floor(log10(1.2346e+02))

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
I want to make a programming function in which I want to take input any mathematical function like f(x)=sin(x)+x^2. then I take a input x and my function return a value of f(x).but i don't know how can i do?
Here is a simple Matlab script; f_math = @(x) sin(x)+x.^2;% mathematical function, notice the element wise operation fun...

plus de 6 ans il y a | 0

Réponse apportée
How to force zero or positive entries in matrix when solving LMI?
You can simply add another constraint to the LMI to impose the constraint. For instance, assume decision variables are x and ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to create for loop for the below case
First of all, your code does not look like it is in order. You define C after you calculate Q? You do not use X in any calculati...

plus de 6 ans il y a | 0

Réponse apportée
How to feed timeseries data to parameter
One way is to define the parameter as a signal (if the parameter is in the gain inside a gain block, change the gain block to pr...

plus de 6 ans il y a | 0

Réponse apportée
returning values of a matrix between two values
desiredData = data(:,event_samples(1):event_samples(end))

plus de 6 ans il y a | 0

Réponse apportée
Closed-loop system identification
Assuming you can add excitation signal to u, and with large enough excitation signal magnitude, you can identify G1 without know...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to make semilogx to get a plot gain against log frequency with several values?
Is this what you want; freq = [2 10 20 60 100 125 150 200 300 400]; Vo = [0.15e-7 .1e-3 .002 .2 1.5 3.28 4.47 4.97 4....

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
solving rlc circuit using ode45
If you were to use the code; [t,y] = ode45(@homework,t,[0 0 0]'); the y here is your i1, i2, and vc. From here yo...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to plot a numerical integration?
The problem is, the quadgk function expect a scalar value from your function. However you assign z to be a vector, hence your fu...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Why FOR LOOP doesn't work for the descrete state space?
The reason is continous time and discrete time A and B matrices are different. In the code you are not using the right A and B m...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Matlab continues to run and wont stop. Is my solution to complicated?
Try doing this in your code; fx = simplify(expand(diff(f,x))); fy = simplify(expand(diff(f,x))); I think in your code, ...

plus de 6 ans il y a | 0

Réponse apportée
How to use LQR for finding the control gain matrix K in presence of constraints?
That is what Q and R matrices are for. Increasing the values in the R matrix will result in a decrease in control input however ...

plus de 6 ans il y a | 0

Réponse apportée
How to write the matlab codes for the following transfer function
Assuming G(z) is a SISO(single input-single output) system, here is the code; z = tf('z'); G = z/(z+1); T = minreal(5...

plus de 6 ans il y a | 1

Réponse apportée
How to separate M*3 matrix by interval of 1
One simple way is; A = rand(20,3)*10; for i = 0:9 At{i+1} = A(A(:,1)>i&A(:,1)<i+1,:,:); % Rows of A matrix where f...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
4-point first derivative
I found a <http://oregonstate.edu/instruct/ch490/lessons/lesson11.htm source> where the equations for the differentiation are sh...

plus de 6 ans il y a | 0

Réponse apportée
optimally selecting elements in matrix to satisfy the system of equations
First of all, in Matlab you need to use expm() function for matrix exponentials. Secondly, your 1st equation is wrong. the ri...

plus de 6 ans il y a | 1

Réponse apportée
Index exceeds matrix dimensions is the error I'm getting.
The reason is simple; since year and Tair_monthly variable do not have sam number of elements, the ind variable tries to access ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Using "solve" on symbolic equation returns complex numbers when it shouldn't.
Because there is an imaginary root to that equation as well. If you were to evaluate your sfun using T2s you will see the result...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Method to manipulate data
You can use "Switch" blocks change your signal from whatever it is to a constant 0 using the time as a determining factor. Al...

plus de 6 ans il y a | 0

Réponse apportée
Sorting and rearranging data in multiple columns
One thing is you cannot store 3 columns in first row and 2 columns in others. Here is a working example of what you want to d...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Assigning a function that does not exist to a new function?
In Matlab functions are defined as function y = funName(x) which takes the input x and outputs y. So in the pasted code...

plus de 6 ans il y a | 0

Réponse apportée
I have a state space system like this and I want to Augment the discrete-time plant model with an integrator, and check controllability and observability of the augmented model.
Integral in discrete time using Forward Euler method; x(k+1) = x(k) + dt*u; y(k) = x(k); Other methods can be found...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Reducing state space order by doing matrix operations
Removing 2nd plant input; B(:,2) = []; Removing the outputs 1,2,3,4,6,7,8; C([1 2 3 4 6 7 8],:) = [];. Adjusting...

plus de 6 ans il y a | 0

Réponse apportée
combining matlab code to simulink
You are looking for " <https://www.mathworks.com/help/simulink/ug/creating-an-example-model-that-uses-a-matlab-function-block.ht...

plus de 6 ans il y a | 0

Réponse apportée
Euler Method IVP Coding Help
Your x vector only has a single element in it. After while loop goes once, it tries to reach x(2), which does not exist. That is...

plus de 6 ans il y a | 0

Charger plus