Origin Ver. and Service Release (Select Help-->About Origin): 2021
Operating System: Windows 10
Hi everyone,
I'm trying to create a script with the Switch command,
In column A I have text data and I want to assign a category to it with the Switch command. I don't know why doesn't work.
Thanks for your help!
get Col(A) -e numpoints;
range aa=Col(A);
for (ii=1; ii<=numpoints; ii++)
{
Switch (aa[ii])
{ 
     case "aa": 
         Col(B)[ii]$="Case aa";
         break;
     case "bb": 
         Col(B)[ii]$="Case ab";
         break;  
     Default: 
         Col(C)[ii]$="Case Default";
         break;
}
}