Solved

MATLAB Basic: rounding IV

Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

plus de 3 ans ago

Solved

MATLAB Basic: rounding III

Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

plus de 3 ans ago

Solved

MATLAB Basic: rounding II

Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

plus de 3 ans ago

Solved

MATLAB Basic: rounding

Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

plus de 3 ans ago

Answered

How can I plot an internal value in a state space model?

Given that the voltage is not a directly controlled input, I do no know how to get this value during a simulation. Is u the vol...

How can I plot an internal value in a state space model?

Given that the voltage is not a directly controlled input, I do no know how to get this value during a simulation. Is u the vol...

plus de 3 ans ago | 0

Answered

how to form matrix

From this documentation: https://mathworks.com/help/matlab/learn_matlab/matrices-and-arrays.html Try: m = [ m11 m12 ...

how to form matrix

From this documentation: https://mathworks.com/help/matlab/learn_matlab/matrices-and-arrays.html Try: m = [ m11 m12 ...

plus de 3 ans ago | 0

Answered

Expressing an even number in powers of 2 and a multiple of an odd number.

I would do something like a = 80; r = 1; d = a/2; while mod(d,2)==0 r=r+1; d=d/2; end

Expressing an even number in powers of 2 and a multiple of an odd number.

I would do something like a = 80; r = 1; d = a/2; while mod(d,2)==0 r=r+1; d=d/2; end

plus de 3 ans ago | 0

Answered

Simulink Serial Receive, Selection of communication port

This was a problem related to permission right, I had to acces to the device as an admin to be able to communicate with it.

Simulink Serial Receive, Selection of communication port

This was a problem related to permission right, I had to acces to the device as an admin to be able to communicate with it.

plus de 3 ans ago | 0

| accepted

Answered

Nyquist plot from 0 to Inf (only frequencies > 0)

If you specify the frequency as W = {WMIN,WMAX} WMIN and WMAX are real frequencies satisfying 0<=WMIN<WMAX<=Inf. So by settin...

Nyquist plot from 0 to Inf (only frequencies > 0)

If you specify the frequency as W = {WMIN,WMAX} WMIN and WMAX are real frequencies satisfying 0<=WMIN<WMAX<=Inf. So by settin...

plus de 3 ans ago | 0

Answered

How can the output be written in a new column (without overwriting the previous one)

You can use cell for that. You can try and adapt the following example: a=cell(3,1); for i=1:3 a{i}=ones(i,1); end a ...

How can the output be written in a new column (without overwriting the previous one)

You can use cell for that. You can try and adapt the following example: a=cell(3,1); for i=1:3 a{i}=ones(i,1); end a ...

plus de 3 ans ago | 0

Answered

how to use two for loop in one matlab program

You should read this: https://mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html You cannot write v(z)(...

how to use two for loop in one matlab program

You should read this: https://mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html You cannot write v(z)(...

plus de 3 ans ago | 0

Answered

How to solve: Error using "csvread". Too many output arguments

As the error says, you are requesting two many outputs arguments. The function 'csvread' only returns one output.

How to solve: Error using "csvread". Too many output arguments

As the error says, you are requesting two many outputs arguments. The function 'csvread' only returns one output.

plus de 3 ans ago | 0

Question

Simulink Serial Receive, Selection of communication port

Hi, From the help of this component: https://mathworks.com/help/instrument/serialreceive.html?searchHighlight=serial%20recei...

plus de 3 ans ago | 1 answer | 0

Answered

How to solve a 2D PDE with backward Euler?

At line 58, you are trying to access the 11th element of the Number matrix, but its dimensions are 10 x 10, so you get an error....

How to solve a 2D PDE with backward Euler?

At line 58, you are trying to access the 11th element of the Number matrix, but its dimensions are 10 x 10, so you get an error....

plus de 3 ans ago | 0

| accepted

Answered

Appending data with different sizes

The easiest way would be the following something like this: a = [1 2 3]; b = [4 5 6 7]; n=size(b,2) a_bis=[a zeros(1,n)]; c...

Appending data with different sizes

The easiest way would be the following something like this: a = [1 2 3]; b = [4 5 6 7]; n=size(b,2) a_bis=[a zeros(1,n)]; c...

plus de 3 ans ago | 0

Answered

help regarding controllability of input matrix

Is the matrix V completely free ? If you can actually add any input to your system, why don't you simply define C = eye(3) ...

help regarding controllability of input matrix

Is the matrix V completely free ? If you can actually add any input to your system, why don't you simply define C = eye(3) ...

plus de 3 ans ago | 0

Answered

I need to view frequency spectrum with 50 kHz, 100 kHz and 150 kHz only of a time a signal (x) with 2000 kHz sampling frequency.How to do ?

Can you give more details about your problem ? Do these answers help you ? https://mathworks.com/matlabcentral/answers/36430-p...

I need to view frequency spectrum with 50 kHz, 100 kHz and 150 kHz only of a time a signal (x) with 2000 kHz sampling frequency.How to do ?

Can you give more details about your problem ? Do these answers help you ? https://mathworks.com/matlabcentral/answers/36430-p...

plus de 3 ans ago | 0

Answered

where is the error ?

In the command line, where you defined v, call the function this way: >> v= [1 2 3 ;4 5 6]; >> mini(v)

where is the error ?

In the command line, where you defined v, call the function this way: >> v= [1 2 3 ;4 5 6]; >> mini(v)

plus de 3 ans ago | 0

Answered

Modbus TCP/IP localhost

This was a firewall issue. Ubuntu has a built-in firewall that one can deactivate using this solution: <https://askubuntu.com/q...

Modbus TCP/IP localhost

This was a firewall issue. Ubuntu has a built-in firewall that one can deactivate using this solution: <https://askubuntu.com/q...

presque 4 ans ago | 0

| accepted

Answered

Matlab to Python ( dot product and dot divide equivalents )

Please refer to: http://mathesaurus.sourceforge.net/matlab-numpy.html or https://docs.scipy.org/doc/numpy/user/numpy-for-matl...

Matlab to Python ( dot product and dot divide equivalents )

Please refer to: http://mathesaurus.sourceforge.net/matlab-numpy.html or https://docs.scipy.org/doc/numpy/user/numpy-for-matl...

presque 4 ans ago | 0

Answered

Forced step response of a signal

You can set the initial values of the step using stepDataOptions: <https://mathworks.com/help/control/ref/stepdataoptions.html>...

Forced step response of a signal

You can set the initial values of the step using stepDataOptions: <https://mathworks.com/help/control/ref/stepdataoptions.html>...

presque 4 ans ago | 0

Answered

Help with animating a line correctly

Is this what you're looking for: %This for loop is what does the drawing for idx = 1:length(t) figure(1); clf; ...

Help with animating a line correctly

Is this what you're looking for: %This for loop is what does the drawing for idx = 1:length(t) figure(1); clf; ...

presque 4 ans ago | 1

| accepted

Answered

Calling Maple from Matlab

_Maple_ is not a built-in function that you can call in matlab. If you have installed Maple on your computer, you can launch ...

Calling Maple from Matlab

_Maple_ is not a built-in function that you can call in matlab. If you have installed Maple on your computer, you can launch ...

presque 4 ans ago | 0

Question

Modbus TCP/IP localhost

Hi, I would like to set up a modbus communication using TCP/IP. In order to test it, I wanted to set the communication bet...

presque 4 ans ago | 1 answer | 0

Answered

Addition of two unequal matrices

You cannot compute A+B. You can only compute the sum for each column: A+B ans = 2 1 1 1 1 ...

Addition of two unequal matrices

You cannot compute A+B. You can only compute the sum for each column: A+B ans = 2 1 1 1 1 ...

presque 4 ans ago | 0

Answered

find eigenvalues of a very large sparse matrix

Dod you have a look at _eigs_ ? <https://mathworks.com/help/matlab/ref/eigs.html>

find eigenvalues of a very large sparse matrix

Dod you have a look at _eigs_ ? <https://mathworks.com/help/matlab/ref/eigs.html>

presque 4 ans ago | 1

Answered

Verification problem-absolute/relative error

Are you working with floating point numbers? Have a look here: <https://mathworks.com/help/matlab/ref/eq.html#bt2klek-3>

Verification problem-absolute/relative error

Are you working with floating point numbers? Have a look here: <https://mathworks.com/help/matlab/ref/eq.html#bt2klek-3>

presque 4 ans ago | 0

| accepted

Answered

Using an existing vector in a .M file

Does this discussion <https://mathworks.com/matlabcentral/answers/1748-storing-user-input-as-a-vector> answer your question ?

Using an existing vector in a .M file

Does this discussion <https://mathworks.com/matlabcentral/answers/1748-storing-user-input-as-a-vector> answer your question ?

presque 4 ans ago | 0

Answered

How to extract a specific value from a loop.

_t_ is your time variable, so you have to use it to test if it's equal to 2seconds. if t==2 % assumes your time units i...

How to extract a specific value from a loop.

_t_ is your time variable, so you have to use it to test if it's equal to 2seconds. if t==2 % assumes your time units i...

presque 4 ans ago | 0

| accepted

Solved

Longest run of consecutive numbers

Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

presque 4 ans ago