I would to save the values for post processing from file output, can you help me?
Show older comments
I have a file .txt which i would to obtain the values for post processing. For this in Matlab i am using:
outputfile=fopen(postproces.dat,'r');
But the file have this line:
fan= 30.000 bes = 2.3700 doe = 15.490
and i would to catch 2.3700 and save it into a variabile bes in Matlab. Thanks.
Accepted Answer
More Answers (1)
Image Analyst
on 4 May 2019
0 votes
You can probably use csvread(), dlmread(), readtable(), importdata(), textscan(), or fgetl(). (Just one of those functions of course!)
If none of those work, attach 'postproces.dat' so we can figure it out for you.
4 Comments
mattvanviore
on 4 May 2019
Image Analyst
on 4 May 2019
OK.
But we are still waiting.
Any idea when you will attach your data file? Come on, make it EASY for people to help you, not hard.
I need to leave now but might check back later today, or tomorrow.
mattvanviore
on 5 May 2019
per isakson
on 5 May 2019
Edited: per isakson
on 5 May 2019
Your file, postprocessing.txt, looks like this
---------------------------------------------------------------
Vortex Lattice Output -- Total Forces
Configuration: ALA ANALISI lambda0.2-massa 2000kg-AR 4
# Surfaces = 2
# Strips = 40
# Vortices = 240
Sref = 30.000 Cref = 3.1500 Bref = 10.950
Xref = 0.0000 Yref = 0.0000 Zref = 0.0000
CDvis = 0.00000 CDind = 0.1076431
Do the files always have 12 lines and this format?
What about the line, fan= 30.000 bes = 2.3700 doe = 15.490 , of your question?
Do you want to capture only the value of Cref ?
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!