Enter matrix as table format in editor?

Hello,
it is possible to enter a matrix like in the matlab editor
M=[ 1 200 56;
67 0 34;
9 1123 467];
in a kind of "table format" that does not loose its arragement of rows and colummns if I i.e. change the number of digits in one place?
Best regards, Tina

댓글 수: 2

madhan ravi
madhan ravi 2019년 3월 25일
please share a picture of your desired with the matrix M
Tina Gottwald
Tina Gottwald 2019년 3월 25일
Hello,
I can enter the matrix as shown above in "text format" in the Matlab editor.
If I then double click on M in the workspace, I get the "table format" shown in the lower half of the picture.
However, if I edit matrix M in the "table format", the change will be lost if I clear the workspace oder close matlab.
A change in the "text format" in the editor is permanent, as long as I save the file.
I would like to use the "table format" but still work the same as in the editor. Is this possible?
Best regards, Tina
matlabforum.PNG

댓글을 달려면 로그인하십시오.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 25일

0 개 추천

If I undestand the question, are you looking for this one or mat file??
M=[ 1 200 56;
67 0 34;
9 1123 467]
Command Window:
M =
1 200 56
67 0 34
9 1123 467

댓글 수: 4

Tina Gottwald
Tina Gottwald 2019년 3월 25일
Hello,
I am looking for a way to enter a matrix in Matlabs editor window 'neatly" like in a table. Like in excel, not as in a text editor, where I have to work with spaces and taps to keep the arrangement of rows and colummns if I change a number in the matrix.
I dont care about the output in the command window.
Best regards, Tina
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 25일
편집: KALYAN ACHARJYA 2019년 3월 25일
Same thing internaly reflected in varibles (Double click on particular variable)
Tina Gottwald
Tina Gottwald 2019년 3월 25일
편집: Tina Gottwald 2019년 3월 25일
Hello,
this format would be the thing I need.
However, I do want to enter a certain matrix in the editor (m.file) permanently and save it, not just enter it in the workspace.
Best regards, Tina
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 25일
편집: KALYAN ACHARJYA 2019년 3월 25일
Hello @Tina
Matrices or vectors are stored in that similliar way. All variables use in script are reflected in workspace, just double click on the variable in workspace you will get the sheet.
All vectors are reflected in the same way internally.
If you want to read/write excel sheet, you can look here or xlsread function.
Hope it Helps!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

질문:

2019년 3월 25일

댓글:

2019년 3월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by