フィルターのクリア

How to create a loop for going through lines??

1 回表示 (過去 30 日間)
Madison Goodwin
Madison Goodwin 2018 年 5 月 17 日
回答済み: Geoff Hayes 2018 年 5 月 17 日
fileID = uigetfile();
data = fopen(fileID);
line = fgetl(data);
line = sscanf(line, '%f V, %i counts, %i ms');
vout = line(1);
counts = line(2);
t = line(3);
My original data is composed of three columns: voltage, counts and time It has 20 rows, I want to cycle through each row so I can graph the change of say voltage and time. I am using a GUI interface. How do I write a loop to be able to do this, or is there a way I can covert the line into an array that is composed of the data

回答 (1 件)

Geoff Hayes
Geoff Hayes 2018 年 5 月 17 日
Madison - see importdata and in particular the example import a text file which you might be able to use to read in your three columns of data (from the file chosen by the user).

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by