ı want to create a matrices for this indicated values. but ı confused about something that ı shown below. what if its one component is not given or there is nothing there, what can ı put there to make all matrices same size?

2 ビュー (過去 30 日間)

回答 (2 件)

Cris LaPierre
Cris LaPierre 2020 年 12 月 21 日
編集済み: Cris LaPierre 2020 年 12 月 21 日
In this situation, the data is missing. Read the page Missing Data in MATLAB.
You can't leave an element empty, but you can fill it with a missing value. MATLAB will then place the appropriate value for the data type. Use the function missing.
  • double, single, duration, and calendarDuration convert missing to NaN
  • datetime converts missing to NaT
  • categorical converts missing to <undefined>
  • string converts missing to <missing>

Image Analyst
Image Analyst 2020 年 12 月 21 日
編集済み: Image Analyst 2020 年 12 月 21 日
Depends on what you're going to do with the data. Maybe you should just delete the row. Maybe you should set the missing values to 0 or nan. Maybe you want to call fillmissing(). Tell us what you think you should do once you hit that row of the table. What are you doing with all the other, valid rows in the table?
  3 件のコメント
Image Analyst
Image Analyst 2020 年 12 月 22 日
So did you try fillmissing() or not???
matlab coder
matlab coder 2020 年 12 月 22 日
ı put ''NaN'' at not given values. because in the fillmissing() ı should write a method, dimention or constant.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by