How to write a function with two output variables that return numerical and text data

I am trying to write a function with two outputs num_data and Txt_data. I need the function to return this infomation. It is taking this info from an imported xlsx file. This is what I have so far but I'm not sure its correct.

댓글 수: 1

"How to write a function with two output variables that return numerical and text data"
You should start by reading this page, which explains the basics of how to define and call functions:
Note that the documentation shows how to define output arguments. So far you have not defined any output arguments, so the variables NUM_DATA and TXT_DATA are simply discarded when the function returns.
You also have not defined input arguments, so NUM and TXT are undefined within that function (so would throw an error).
But all of that is rather moot becuse you have not called that function anywhere, which means currently your function does nothing at all. You need to call the function if you want to use it (calling means writing it down in code with all of its required inputs and outputs, exactly as you call XLSREAD in your code with one input and two outputs).

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

2022년 10월 29일

댓글:

2022년 10월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by