Thanks for the feedback!
This is what I am trying to achieve, this is a sample test code for a case operation
A = [3 4 5; 7 2 6; 8 1 9];
d = A(1,1);
g = A(2,1);
y = input('enter a value: ');
switch (y)
case d
xpos = [A(1,3) A(2,2) A(3,1)]
xneg = [A(3,1) A(2,2) A(1,3)]
case g
xxpos = [A(1,1) A(2,1) A(2,2)]
xxneg = [A(1,1) A(2,1) A(2,2)]
endswitch
z = input('enter a different value: ');
switch (z)
case {xpos, xxpos}
r = A(2,2)+A(2,1)
case {xneg, xxneg}
n = A(3,1)+A(2,1)
endswitch
After displaying the results of first switch, I would like to use a different switch whose values are in the range xpos or xxpos it should perform one operation then if
the value is in range of xneg or xxneg it should perform another operation. But since we either chose one case the other case value is not invoked to it throws an error like this
enter a different value: 5
error: 'xxpos' undefined near line 19 column 19
error: called from
nabbleuserJamessherman at line 18 column 5