English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-01-11 20:50:31 · 3 answers · asked by Anonymous in Science & Mathematics Engineering

3 answers

I assume you mean read text from a txt file (instead of running Matlab commands, script-like, from a text file).

There may be a more elegant solution, but I generally use something like this... mainly because I don't do it often enough to find something better :)

------------------------------------
%Load text from file
FID = fopen("filename.txt");
text = fread(FID, [1,inf], 'char');
fclose(FID);

%Do something with the text
str2mat(text)
------------------------------------

2007-01-11 21:23:59 · answer #1 · answered by Gavin P 2 · 0 0

you could purchase EEPROM programmers. those have a USB or serial interface. They probable comprise software that reads textual content information in a particular format (often S files). Doubt you should use matlab to position in writing a compiler. the common way is making use of Lex, Yacc and a C compiler to position in writing one as I suggested in yet another answer.

2016-12-02 04:00:15 · answer #2 · answered by ? 4 · 0 0

Yes you can. you can use 'load' function, if you need more info you can digit 'help load'.....and matlab will give you what you need to be able to use the function 'load' (for example the syntax needed....), you can always ask matlab this help writing 'help' and the name of the function.

2007-01-12 04:41:52 · answer #3 · answered by sparviero 6 · 0 0

fedest.com, questions and answers