How to input string in a Matlab function -


i want write function loads text file , plots content time. have 20 text files want able choose them.

my current not working code:

textfile generic variable text123.txt actual name of 1 of files want load

function []= plottext(textfile)   text(1,:)=load('text123.txt') ;  t=0:10;  plot(t,text)  end 

i appreciate help!!

use importdata instead of load appropriate delimiter. assume used tab.

filename = 'num.txt'; delimiterin = '\t'; text = importdata(filename,delimiterin) t=1:10; plot(t,text); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -