Creating an ascii map for each value of a table
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Elena Benedetta Masi
el 19 de Jul. de 2019
Respondida: Vinai Datta Thatiparthi
el 5 de Ag. de 2019
For every value of the excel table I have to create an ASCII map like the one in the picture in which every place (-9999) is replaced with that value.
For example, a map with 2.8 (row 439 of the excel table) in each cell of the ASCII file (at the place of every -9999), another with 4.8 (row 440 of the table) and so on for every subsequent cell of the excel file, an essential thing is that the ASCII file has to have the exact header of the picture, empty spaces included.
What could be the best approach? The logical point of view is simple but I'm encountering some issues.
2 comentarios
Guillaume
el 19 de Jul. de 2019
For every value of the excel table
What excel table?
an ASCII map like the one in the picture
What do you call an ASCII map?
For example, a map with 2.8
What is a map with 2.8?
(row 439 of the excel table)
Again, what table?
in each cell of the ASCII file
What is a cell of an ASCII file?
Respuestas (1)
Vinai Datta Thatiparthi
el 5 de Ag. de 2019
Hi Elena!
It’s unclear from the description of your question how you wish to map the values between the Excel document and the values in the .txt file. I’m assuming that you would like to improve the data importing part of your code. For reading the data from the excel document, use the readtable function, and for reading the data from the .txt file, you may use textscan, which can be useful to remove the header information while importing the data.
After you have the data in arrays in MATLAB, you can map the values simply using indexing. Consider using the function find to get the values of interest. This is a simple way to get your expected values.
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!