Inputting a matrix to a function

조회 수: 2 (최근 30일)
fsgeek
fsgeek 2013년 1월 11일
Hi guys,
I've got a function called "blockAnalysis" which uses matrices with any number of blocks:
DATA=[a1 a2 a3;b1 b2 b3;c1 c2 c3;...];
I pass this data to the function in the following way:
blockAnalysis(DATA);
I then get the following warning message:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> MMM at 35
blockAnalysis(MinMaxXX,MinMaxYY,MinMaxZZ,MinMaxXY,MinMaxYZ,MinMaxXZ);
MinMaxXX, MinMaxYY etc. are different instances of the matrix DATA.
So is it not possible to have matrices as function inputs?

채택된 답변

Rick Rosson
Rick Rosson 2013년 1월 11일
>> doc varargin
>> doc varargout

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 11일
Try this
clear blockAnalysis
blockAnalysis(DATA);

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by