I've got an excel file which contains a column for sex,'F' and 'M'. 'F' means female and 'M' means male. I used xlsread() to load this data, and got multiple cells( size is 1*n,n for number of people), each cell contains a character 'F' or 'M'. I want to transfer the character to number 0 or 1, 0 means 'F' and 1 means 'M'. How can I do it?
MATLAB: How to change character in multiple cells in to number 0 and 1
characterimporting excel data
Related Question
- How to compute a partial F-test for multiple linear regression
- Isolating values in a table based on user input
- Importing csv file into MATLAB gives an error
- Using a cell array and a for loop
- Deleting the first 4 rows of a .csv file.
- How to close exponential view in uitable and increase the rows width
- How to write character(39) to excel file
Best Answer