回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 1

| 採用済み

回答済み

How to extract the exponential term?

Here is one way; floor(log10(1.2346e+02))

How to extract the exponential term?

Here is one way; floor(log10(1.2346e+02))

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

回答済み

returning values of a matrix between two values

desiredData = data(:,event_samples(1):event_samples(end))

returning values of a matrix between two values

desiredData = data(:,event_samples(1):event_samples(end))

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 1

| 採用済み

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 1

回答済み

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

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

3年以上 前 | 1

| 採用済み

回答済み

4-point first derivative

I found a <http://oregonstate.edu/instruct/ch490/lessons/lesson11.htm source> where the equations for the differentiation are sh...

4-point first derivative

I found a <http://oregonstate.edu/instruct/ch490/lessons/lesson11.htm source> where the equations for the differentiation are sh...

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 1

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 1

| 採用済み

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

| 採用済み

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0

回答済み

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

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

3年以上 前 | 0