Data import and establish correlation between data
Afficher commentaires plus anciens
file1=fopen('IV.txt');
current=textscan(file1,'%f''%f''%f')
a=current
Trial>> whos a
Name Size Bytes Class Attributes
a 1x3 336 cell
whos a is showing only size of 1X3 whereas total data size is 18361x3 and
Trial>> a{1}
ans =
0×1 empty double column vector
How can i correctly import and separate
VDS VGS IDS.i[0, ::] ??
Also i have only separate file VDS VGS gm
and i want to have Index array containing following columns
VDS VGS IDs gm
for all Index so that i can define a function which can depend either on all of these or any of these
How can I do that??
Thanks and Regards
Réponses (1)
dpb
le 14 Avr 2018
You didn't account for the header line...
current=cell2mat(textscan(file1,repmat('%f'1,3),'headerlines',1,'collectoutput',1));
will give the Nx3 double array.
However, readtable is much simpler to use and gives you the named variables (or opportunity to name them; in VDS VGS IDS.i[0, ::] for the header the last column header isn't a valid Matlab variable name so it won't be able to be used automagically; if you can fix the input files is simplest...
t=readtable('IV.txt');
should get you the data; study the examples for readtable to see how to handle the headerline issues, etc., etc., ...
Catégories
En savoir plus sur Text Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!