How to reshape different row of MNIST and display them

10 ビュー (過去 30 日間)
Azar Alizadeh
Azar Alizadeh 2020 年 10 月 27 日
回答済み: Azar Alizadeh 2020 年 10 月 27 日
Hi,
Each row of MNIST dataset is an image of a number. so to display them I nead to reshape each row and plot. But since MNIST has 60000 row I can't use a for loop it takess a long time. Would you please tell me how can I reshape each row of MNIST matrix without using for loop in matlab and display each of them?
  2 件のコメント
Adam Danz
Adam Danz 2020 年 10 月 27 日
What's a MNIST matrix?
Could you also clarify what you mean by reshape?
Azar Alizadeh
Azar Alizadeh 2020 年 10 月 27 日
編集済み: Azar Alizadeh 2020 年 10 月 27 日
oh sure. sorry for unclear question. MNIST is a data set that of handwriiten numbers. so I have it as a 60000x784 matrix. that mean there are 60000 samples ( that are different number) so If I use "reshape" function of matlab like for example this {{{ I=imagesc(reshape((MNIST(1,:)),28,28)') }}} , I can reshape first row of my matrix and plot it with plots a number.
Since the dataset(matrix) is really big I don't want to use for loop to reshape each row. and plot them. would you please assist me how can I do that parrallel?

サインインしてコメントする。

採用された回答

Azar Alizadeh
Azar Alizadeh 2020 年 10 月 27 日
I got the answer :
matrixes=arrayfun(@(c)reshape(MNIST(c,:),28,28),1:size(MNIST,1),'uniformoutput',false);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBlue についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by