필터 지우기
필터 지우기

using the table function with empty variables

조회 수: 1 (최근 30일)
Vivian Dinh-Dang
Vivian Dinh-Dang 2018년 4월 12일
댓글: Vivian Dinh-Dang 2018년 4월 14일
I would like to use the table function to put all my variables into a table. Some of my variables are empty, [], and so the table function no longer works. Is there any way I can write a code that searches for all the empty variables in my workspace and fill these variables with NaN and then use a code with the table function afterwards?
I have tried using various options such as fillmissing, variables=who, isempty, etc to no avail. It may be because I don't know how exactly to tailor these codes to work the way I want them to.
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 4월 12일
Yes, it is possible, but it is bad programming practice. You should be creating all of those variables inside one data structure and then processing the data structure.
Vivian Dinh-Dang
Vivian Dinh-Dang 2018년 4월 14일
I see. Okay, thank you! I will try to reformat my codes to create the variables into one structure so that it is better.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by