Create Array in Simulink
이전 댓글 표시
Hello
I want to create an array in Simulink based on two constants. Like using "linspace(1,1,10)" in Matlab, but from two constant blocks of magnitude "1" and "10".
Thanks in Advance
답변 (1개)
Azzi Abdelmalek
2015년 8월 9일
0 개 추천
댓글 수: 2
David C
2015년 8월 9일
Azzi Abdelmalek
2015년 8월 10일
function y = fcn(u)
%#codegen
coder.extrinsic('linspace')
y = coder.nullcopy(zeros(1,numel(u)));
y =linspace(1,u, u)
Don't forget to declare the output y (type edit data in the editor of your function) as variable size.
카테고리
도움말 센터 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!