How to read a txt table for selecting stimuli...?

1 回表示 (過去 30 日間)
Chiara Mazzocconi
Chiara Mazzocconi 2018 年 4 月 13 日
回答済み: Von Duesenberg 2018 年 4 月 13 日
Hi every body! I'm a beginner and very embarrassed to need help...!! I'm preparing an experiment where I have to play videoclips in a randomised order according to their type... I'm having issue reading the table where the filenames and their category is written...
I attach my table...! and I paste the bit of the script that I think is relevant (please if it's not enough let me know!!) and error that occurs..!
%%%%bit of code that I think is relevant%%%%%%%%
studyfilename = 'studylist4.txt';
trialfilename=studyfilename
[ objnumber, objname, objtype ] = textread(trialfilename,'%d %s %d');
%%%%%%% ERROR %%%%%%%%%%%%
trialfilename =
'studylist4.txt'
Error using dataread Trouble reading integer from file (row 1, field 1) ==>
Error in textread (line 168) [varargout{1:nlhs}]=dataread('file',varargin{:}); %#ok<REMFF1>
Error in fnirstrying (line 95) [ objnumber, objname, objtype ] = textread(trialfilename,'%d %s %d');
Error in run (line 91) evalin('caller', strcat(script, ';'));
Please give me a hand!
Thanks a lot in advance!!
Chiara

回答 (1 件)

Von Duesenberg
Von Duesenberg 2018 年 4 月 13 日
myTable = readtable('studylist4.txt');

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by