Re: [Scilab-users] Loop over string vector

2023-10-03 Thread Pinede Romain
Hello, A basic solution would be to use part (several times) instead of strsplit: function rgb=hex2rgb2(x) // Assuming HEX is a column vector hexrgb = [part(HEX, 1:2), part(HEX, 3:4), part(HEX, 5:6)]; rgb = hex2dec(hexrgb); endfunction Romain De : users De la part de Lester

[Scilab-users] Loop over string vector

2023-10-03 Thread Lester Anderson
Hello, I am trying to loop through a vector of strings but having issues with the strsplit function. The vector consists of HEX values for colours. I created a simple function to get RGB values. function rgb=hex2rgb(x) // x=string input hexrgb=strsplit(x,[2 4])';