Hi, i'm trying to read in a csv file that has a row full of words each in a separate cell.
Current code
clc;
clear;
%Create Matrix
dictionary = [];
dictionary = readtable('Dictionary.csv');
%pick random word
word_index = randi(9876, 1);
disp(word_index);
%selected_word = dictionary(word_index);
The problem is that if I use extractFileText it reads it in as 1x1 string and if I use readtable it reads it in as a 0*9885 table (There are 9885 words in the csv file). I have also tried readmatrix and xlsread
What function would allow me to read in the csv file into the matrix where each word in the csv file is its own element in a 1*9885 matrix?

 채택된 답변

Stephen23
Stephen23 2022년 8월 22일

0 개 추천

READCELL

추가 답변 (0개)

카테고리

태그

질문:

2022년 8월 22일

댓글:

2022년 8월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by