function to read a cell contents
이전 댓글 표시
Hello everybody! As the example shows, i would like that the genre of the variable will be recognized and declared (with print at the screen) and then divided creating two different matrices.Does anybody know the function that i need?
data = {'tomato','VEGETABLE';'banana','FRUIT';'grapes','FRUIT';'pepper','VEGETABLE';'carrot','VEGETABLE';'pear','FRUIT'}
class1 = 'FRUIT'
class2 = 'VEGETABLE'
data1 = {'tomato','VEGETABLE';'pepper','VEGETABLE';'carrot','VEGETABLE'}
data2 = {'banana','FRUIT';'grapes','FRUIT';'pear','FRUIT'}
댓글 수: 2
Oleg Komarov
2013년 4월 7일
What is the purpose? Splitting arrays is not usually recommended if you need to scale up.
Nicolò
2013년 4월 7일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!