フィルターのクリア

함수 출력변수를 구조체로 출력

1 回表示 (過去 30 日間)
상원 김
상원 김 2022 年 8 月 9 日
回答済み: SK woo 2022 年 9 月 2 日
[data.Front, Frontnumber, data.distance] = non_dominated_sorting(data.x, data.z1, data.z2, data.rank1, data.rank2, pop)
위의 코드와 같이 non_dominated_sorting 함수를 data.x data.z1와 같이 구조체로 된 입력값과 data.Front 와 같은 구조체로
출력값을 뽑고싶은데 방법이 있을 까요

回答 (1 件)

SK woo
SK woo 2022 年 9 月 2 日
아래처럼 구조체를 입력받고 함수 내부에서 처리한 후에 구조체를 반환하면 됩니다.
[data, Frontnumber] = non_dominated_sorting(data, pop)

カテゴリ

Help Center および File Exchange구조체 についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!