save size of Matlab environment variable

Hi,
I have some question about the presentation of variable in Variables window.
1) I have a matrix with 18 Column. when i look on row of the matrix i want to look on all the data.
I resize the column to be like i want. the problem is that it not saved. when i run the program again with other number of rows or if i run it after i turn down the program the size don't saved and came to the default.
Do matlab have the possibility to save this resize?
2) It have a way to change the variable format show in this window? (my problem is that 12345.6 look 1.2345e4) Same question for a plot, can i change the format of axis (y) to be 12345 and not 1.2345e4?
tnx

 채택된 답변

Adam
Adam 2014년 11월 3일
편집: Adam 2014년 11월 3일

0 개 추천

If you want to resize a variable and have it stay resized next time you run a program you would have to do the resize in code, or if it is loading the variable from e.g. a .mat file then do the resize and save the updated variable to the mat file before re-running the program.
Preferences -> Command Window -> Format.
Preferences -> Variables -> Format.
control the default formatting of numbers in, respectively, the command window and variable editor. (Note, that is from Preferences in the Matlab Home ribbon, not in code, I just used a code block to split the two instructions for readability). You can change it in the variable editor on a one-time basis from the ribbon at the top.
I don't know about how you can influence the style of number format on axes though.

댓글 수: 4

Yona
Yona 2014년 11월 3일
It the format didn't change in variables only the Command window change.
Adam
Adam 2014년 11월 3일
It does for me if I set both of those parameters. You may need to reopen the variable editor though, or at least close and reopen a variable to see the change (not all notations will show a change either, depending on what the format is and what your data is).
Yona
Yona 2014년 11월 4일
Yes, after i close the variable window it work.
In the list i just didn't find a format i want, but thank you.
Adam
Adam 2014년 11월 4일
Yeah, I don't like most of the formats at all. I think long g or occasionally short g are the only one I find acceptable.

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

추가 답변 (0개)

카테고리

제품

질문:

2014년 11월 3일

댓글:

2014년 11월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by