필터 지우기
필터 지우기

How to export an array, whose outputsize is variable in simulink

조회 수: 2 (최근 30일)
Disheng Wu
Disheng Wu 2022년 3월 12일
답변: Karanjot 2023년 10월 6일
Hello,
I want to export an array, whose original outputsize cannot be determined in simulink.
For example in Simulink,
Function [c,d] = getOutputSizeImpl(~)
c = [? 4];
d = [? 4];
Is there any way to export this array?
Thanks a lot.

답변 (1개)

Karanjot
Karanjot 2023년 10월 6일
Hi Disheng,
I understand that you would like to know how to export an array with a variable output size in Simulink. Please elaborate on the desirable format for export. In the meanwhile, the process to write numeric and text data to a spreadsheet file is as follows:
writecell(C,filename)
The above command, when used in a MATLAB function block, writes to a file with the name and extension specified by filename. ‘writecell’ determines the file format based on the specified extension. The extension must be one of the following:
  • .txt, .dat, or .csv for delimited text files
  • .xls, .xlsm, or .xlsx for Excel spreadsheet files.
If the array is populated, Simulink will export the array irrespective of the size.
To learn more about exporting an array, please refer to the below documentation:
I hope this helps!

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by