Preview truncated at 128 characters?

17 ビュー (過去 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 Center および File ExchangeCell Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by