Hi, I recently wrote a code that looks like this:
function DataSet = Project(SetA, SetB, SetC) DataSet = find(SetA, SetB, SetC); function DataSet = find(SetA, SetB, SetC) Data1 = SetA - SetB; Data2 = SetB - SetC; Data3 = SetC - SetA; DataSet = [Data1, Data2, Data3]; end end
The output looks like this when I input in the command:
DataSet = find(1,2,3)DataSet = -1
If I insert 3 variables such as [Data1, Data2, Data3] = find(1,2,3)
I would get
Data1 = -1Data2 = -1Data3 = -2
which is correct. Is it possible, if so how could I change the code so that it output DataSet as a Matrix instead of just 1 value, because if there's suppose 100 variables, I would not want to manually insert 100 variables.
Best Answer