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

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

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

10 mesi 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) ...

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

10 mesi 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)

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

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

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

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

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

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

circa un anno 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 ...

circa un anno 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>

circa un anno 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>

circa un anno 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 ?

circa un anno 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...

circa un anno 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 ...

circa un anno ago

Solved

Joining Ranges

You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

circa un anno ago

Solved

Return a list sorted by number of consecutive occurrences

Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

circa un anno ago

Solved

Create logical matrix with a specific row and column sums

Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

circa un anno ago

Solved

Piecewise linear interpolation

Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

circa un anno ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

circa un anno ago

Solved

Some Assembly Required

The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

circa un anno ago

Answered

Plotting a signal between 8 and 15 sec

What is the problem exactly? You have your signal u 3001x1, with a sampling time of 10ms. It means that u(1) is the value of...

Plotting a signal between 8 and 15 sec

What is the problem exactly? You have your signal u 3001x1, with a sampling time of 10ms. It means that u(1) is the value of...

circa un anno ago | 0

Answered

Binary to decimal - 8 bits at a time

You can try something like this using _bin2dec_ : for i=1:8:numel(binary) decimal=bin2dec(num2str(binary(i:i+7))) ...

Binary to decimal - 8 bits at a time

You can try something like this using _bin2dec_ : for i=1:8:numel(binary) decimal=bin2dec(num2str(binary(i:i+7))) ...

circa un anno ago | 1

| accepted

Answered

Compare two folders and write the matching files to the third folder

Have a look at the functions _dir_ and _exist_.

Compare two folders and write the matching files to the third folder

Have a look at the functions _dir_ and _exist_.

circa un anno ago | 0

Answered

I have this error, and I don't know how to solve it.Can someone help me please?

The problem is that _Tx_signal_ is not a vector but a matrix of size 1000 x 1000. From the help of _conv_ function: _C = c...

I have this error, and I don't know how to solve it.Can someone help me please?

The problem is that _Tx_signal_ is not a vector but a matrix of size 1000 x 1000. From the help of _conv_ function: _C = c...

circa un anno ago | 0

| accepted

Answered

How to design LQR problem for tracking a reference output

You can use the <https://mathworks.com/help/control/ref/lqi.html lqi> function.

How to design LQR problem for tracking a reference output

You can use the <https://mathworks.com/help/control/ref/lqi.html lqi> function.

circa un anno ago | 1

Solved

Pascal's Matrix

Given an integer n ≥ 0, generate the ( _n_+1) × ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

circa un anno ago