Info

This question is closed. Reopen it to edit or answer.

How can i convert a matrix to a specific feature with matlab

1 view (last 30 days)
Hi everybody again. I tried to do some changes in a matrix with Matlab but unfortunately I couldn’t (see http://www.mathworks.com/matlabcentral/answers/260855-how-can-i-convert-a-matrix-to-a-specific-feature-with-matlab my first question was
_Hello everybody. I need desperately your help as I am not very familiar with Matlab. Let assume that I have two matrixes for instance
a=[205;165;175;165;135]
b=[25;25;55;65;65] (dimension 5x1 each one)
What I want to do is to take the numbers from each row of the matrixes a and b and have a new one with a specific feature like
c=[205 25,165 25,175 55,165 65,135 65]
In more general I want to have a new matrix
C=[a11 b11,a21 b21,a31 b31,aj1 bj1,ai1 bi1]
if the a and b matrixes have ix1 dimension . Also bear in mind that C matrix has a specific feature as I have mentioned so far. What I mean with this is between some aj1 and bj1 there is a space gap and each pair let say a21 b21 and a31 b31 is separated by a comma (,).
Thanks everybody for your help_"
and the answer "Spaces, commas, semicolons are all syntactic elements that are not part of the data that is stored in a matrix. It's only used as for display and input. As far as Matlab is concerned a matrix is just a bunch of numbers.
Therefore, your specific feature is not possible. spaces and commas mean the same thing when you input a matrix and Matlab displays them both as space. semicolons mark the end of a row, when you input a matrix and Matlab displays that as a new line.
It sounds like you're confusing the display of a matrix with the content. As said, a matrix is just numbers. spaces and commas do not feature into it.)
is any other alternative way to do this feature with numbers and commas? Actually what I am trying to do is to have the numbers in such row as to be able to import them in Inkscape

Answers (0)

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!