I just upgraded from version 2018b to R2025B. I used to be able to select data in variable window and right click and select copy. I could then paste this data to a variable assignment in a matlab script and it would format correctly
e.g.
CalIndex=[40,123;159,255;364,468;522,671;732,897;907,993;1000,1220;1242,1335;1473,1534]
It appears that the right click does not show copy option and if I use ctrl-c and then ctrl-v in the matlab script it paste the data as unformatted table
1 123
206 255
398 468
522 671
732 897
907 993
1000 1220
1242 1335
1473 1534
This was a handy way to modify a variable assignment without having to type in the assigment by hand.

댓글 수: 1

Matt J
Matt J 2025년 12월 5일
편집: Matt J 2025년 12월 5일
The reason for the change, I imagine, is that maybe you don't want the data pasted into the same kind of container as the one it came from. Maybe you want it to copy from a matrix to a cell array, as in,
CalIndex={40,123;159,255;364,468;522,671;732,897;907,993;1000,1220;1242,1335;1473,1534}
Or maybe you want to paste numeric data from a table into a matrix.
With the old behavior, you would be forced to remove the default container delimiters manually.

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

 채택된 답변

Walter Roberson
Walter Roberson 2025년 12월 4일
이동: Matt J 2025년 12월 4일

1 개 추천

If you type in
CalIndex = []
and then paste in the N x 2 table between the [ and the ] then everything will work out.

댓글 수: 1

Jeffrey
Jeffrey 2025년 12월 5일
I tried this and this is what I got ...
CalIndex=[1 100
206 255
398 468
522 671
732 897
907 993
1000 1220
1242 1335
1473 1534]
It does work just a little busy in the middle of the script but functional.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

릴리스

R2025b

질문:

2025년 12월 4일

편집:

2025년 12월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by