필터 지우기
필터 지우기

Is it possible to go down a row and still run the code?

조회 수: 12 (최근 30일)
Amit Ifrach
Amit Ifrach 2023년 7월 18일
답변: Chunru 2023년 7월 18일
לק"י
Hello,
I have a code line when building a cell array that will contain alot of values. the code is going way to the right and it is very difficult to change it and look at it. is it possible to make it go down a line and still be able to run it?
If I'm not wrong, pressing space and going down a line in python will not do anything and the code will be read. is there something like this in matlab?
the code line:
analysisdata(1:17,1)={'Image name', 'Cell mask number','Total masked out pixels', 'Masked thrasholded pixels > 1.5', 'Masked thrasholded pixels > 2','Masked thrasholded pixels > 2.5', 'Masked thrasholded pixels > 3','Masked thrasholded pixels > 4','Masked thrasholded pixels > 5', 'Masked thrasholded pixels > 6','Ratio of pixels > 1.5 from toal masked out pixels', 'Ratio of pixels > 2 from toal masked out pixels','Ratio of pixels > 2.5 from toal masked out pixels','Ratio of pixels > 3 from toal masked out pixels','Ratio of pixels > 4 from toal masked out pixels','Ratio of pixels > 5 from toal masked out pixels','Ratio of pixels > 6 from toal masked out pixels'};
how it looks in the screen:
How I want it to look:
Thank you!
Amit.

답변 (1개)

Chunru
Chunru 2023년 7월 18일
Use ... at the end of line for line continuation
analysisdata(1:17,1)={'Image name', 'Cell mask number', ...
'Total masked out pixels', 'Masked thrasholded pixels > 1.5', ...
'Masked thrasholded pixels > 2','Masked thrasholded pixels > 2.5', ...
'Masked thrasholded pixels > 3','Masked thrasholded pixels > 4', ...
'Masked thrasholded pixels > 5', 'Masked thrasholded pixels > 6', ...
'Ratio of pixels > 1.5 from toal masked out pixels', ...
'Ratio of pixels > 2 from toal masked out pixels', ...
'Ratio of pixels > 2.5 from toal masked out pixels', ...
'Ratio of pixels > 3 from toal masked out pixels', ...
'Ratio of pixels > 4 from toal masked out pixels', ...
'Ratio of pixels > 5 from toal masked out pixels', ...
'Ratio of pixels > 6 from toal masked out pixels'}
analysisdata = 17×1 cell array
{'Image name' } {'Cell mask number' } {'Total masked out pixels' } {'Masked thrasholded pixels > 1.5' } {'Masked thrasholded pixels > 2' } {'Masked thrasholded pixels > 2.5' } {'Masked thrasholded pixels > 3' } {'Masked thrasholded pixels > 4' } {'Masked thrasholded pixels > 5' } {'Masked thrasholded pixels > 6' } {'Ratio of pixels > 1.5 from toal masked out pixels'} {'Ratio of pixels > 2 from toal masked out pixels' } {'Ratio of pixels > 2.5 from toal masked out pixels'} {'Ratio of pixels > 3 from toal masked out pixels' } {'Ratio of pixels > 4 from toal masked out pixels' } {'Ratio of pixels > 5 from toal masked out pixels' } {'Ratio of pixels > 6 from toal masked out pixels' }

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by