필터 지우기
필터 지우기

Preview truncated at 128 characters?

조회 수: 11 (최근 30일)
Salad Box
Salad Box 2017년 11월 18일
댓글: Walter Roberson 2017년 11월 18일
Hi
I tried to obtain 100 urls of images from Internet Explorer. However I can obtain approximately 30 urls followed by blank rows. See the screenshot below:
Noticed that 'Preview truncated at 128 characters' appear twice here. Is this the reason why I get the rest all blank rows? Would this affect on displaying further URLs?
When I copied and pasted (ctrl+c then ctrl v) the last url into microsoft word, it shows as below which is a valid url to an image file.
I would like to find out why I get all these blank rows. Is there a maximum number of characters that can be stored in each row in a cell? Even there is, judging by the look of the url shown in the second image, it doesnt seem it has reached the maximum limit.
Thanks in advance.

채택된 답변

Steven Lord
Steven Lord 2017년 11월 18일
"Noticed that 'Preview truncated at 128 characters' appear twice here. Is this the reason why I get the rest all blank rows? Would this affect on displaying further URLs?"
No and no. That statement means exactly what it says -- we truncated the displayed preview of that row of that variable in the Variable component. It has no effect on the contents of the variable, just that displayed preview. Imagine if you had a large cell array where all the cells but one contained a six letter char vector and the last one contained a char vector 100000 characters long. Would you want to have the Variable component of the desktop be 100000 characters wide even though most of your elements are much, much shorter than that?
"Is there a maximum number of characters that can be stored in each row in a cell?"
Theoretically yes, there is a maximum number of elements that can be stored in a variable in MATLAB. Practically you're not going to reach that limit, you'd run out of memory first. Even more practically, you haven't run out of memory, not with that small amount of data.
As for why you have rows containing [], that's going to be impossible to answer without seeing some code. It's possible you simply preallocated the cell array to be to long and need to reduce how much you preallocate or trim it after you fill in the cell array.
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 11월 18일
For a number of years now, MATLAB has only been available on Intel architectures (there was a time it was available on Sparc (Solaris), on MIPS (IRIX), and on PowerPC (Mac)). Since R2016a, it has only been available on Intel x64 architecture.
It happens that in all publicly known x64 chips, only 48 address lines are designed in rather than 64. This restricts the address space to at most 256 terabytes; for technical reasons, the first bit is reserved so the memory limit is really only 128 terabytes.
Each character requires 2 bytes, so you are restricted to 64 tera elements in a character array.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by