Create an array from the input of a MATLAB FUNCTION BLOCK
이전 댓글 표시
Hi,
I would like to create an array that contain the values of the input u that enter the MATLAB FUNCTION BLOCK

Trough the Simout the input is

but in the matlab code it enters a 1*1. I need to have the vector with the value of Data:1 in order to cycle on it.

in the last picture num is equal to 1. I need a way to create a vector with the value of u (4 5 1 5 3 1 2 1 5 5 2)
THANKS
답변 (1개)
Abhilash Padma
2019년 7월 24일
0 개 추천
Hi,
I understand that you want to get an array as an output of MATLAB function block. But you are getting a value with 1x1 dimensions as an output of MATLAB function block. This is because every time a single value is passed as an input to the MATLAB function block. If you want to pass all values at a time into the MATLAB function block, One way is you can use the “Constant Block” and assign the vector as the value of the Constant Block.
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!