How to get mesh to plot data correctly with tab delimited text files?
Show older comments
I'm not sure if I have misunderstood the concept of mesh, seeing as I'm fairly new to programming in MATLAB again. I've been trying to get MATLAB to graph data that I've gotten from a Monte Carlo N particle simulation (MCNPX) and have managed, with some struggle, to get the program to output a file of the form:
X_Value Z_Value Flux Error
-6.93000 -6.93000 0.244128E-05 0.235944
And so on iterating down to a full grid value of +7 respectively where all gaps are separated by tabs and all values for Flux are between E-05 and E-01.
My problem is when I use mesh in the following way:
tdfread
Data = [X_Value, Z_Value, Flux];
mesh(Data);
xlabel('X axis');
ylabel('Z axis');
I end up with a hideous mess with all the wrong values, wrong scaling, etc. Similarly there is another program which I can use to extract the binary data directly from the data files I am using but the way the data is referenced is confusing. I will include this information later on if I have no way to proceed directly.
2 Comments
Nicholas
on 30 Mar 2013
Walter Roberson
on 30 Mar 2013
Do your X and Z values form a full grid? So that for each combination of unique X value and unique Z value, there is a Flux ?
If your data does not form a full grid then mesh() is not appropriate, at least not without some pre-processing.
Answers (0)
Categories
Find more on Develop Apps Using App Designer 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!