Upload data from file and store into variable
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
HI, So far I have the code that takes the coordinates from the airfoil and stores all of them in a variable to be later used in the code. However I need to know how many points are being stored in the variables.
This is the input file
1.0000000 0.0000000
0.9500000 -.0074400
0.9000000 -.0130900
0.8000000 -.0204800
0.7000000 -.0236700
0.6000000 -.0235600
0.5000000 -.0216500
0.4000000 -.0191400
0.3000000 -.0183300
0.2000000 -.0195200
0.1500000 -.0207600
0.1000000 -.0220100
0.0750000 -.0222300
0.0500000 -.0218500
0.0250000 -.0195800
0.0125000 -.0164400
0.0000000 0.0000000
0.0125000 0.0204600
0.0250000 0.0304200
0.0500000 0.0456400
0.0750000 0.0576700
0.1000000 0.0670900
0.1500000 0.0822400
0.2000000 0.0921800
0.3000000 0.1018700
0.4000000 0.0993600
0.5000000 0.0897500
0.6000000 0.0743400
0.7000000 0.0567300
0.8000000 0.0378200
0.9000000 0.0197100
0.9500000 0.0116600
1.0000000 0.0000000
This is the code I'm using to get data from the file:
function [x,y]=AirfoilC
load Airfoil.dat; % read data into the my_xy matrix
x = Airfoil(:,1); % copy first column of my_xy into x
y = Airfoil(:,2);
So I need another variable that states how many points are being stored in x and output that for later usage.
0 Commenti
Risposte (1)
per isakson
il 18 Apr 2014
Modificato: per isakson
il 20 Apr 2014
Try
number_of_rows_of_my_xy = size( my_xy, 1 );
and
doc size
0 Commenti
Vedere anche
Categorie
Scopri di più su Airfoil tools in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!