Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Using txt file to form Matrix

1 vue (au cours des 30 derniers jours)
Rafael Sario
Rafael Sario le 2 Avr 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
Say I have the following data in a text file
Node_Coordinates (x,y)
0 0
4 5
8 0
12 5
Loads(Node#, Load, Direction)
1 200 0
3 100 180
Boundary_Conditions (Node, dof, direction of movement)
2 0 0
4 0 0
How can I make a matrix for each different table?
  3 commentaires
Rafael Sario
Rafael Sario le 2 Avr 2020
Hello there, I've updated the text file to reflect what it actually looks like. Thank you
dpb
dpb le 2 Avr 2020
OK, yes, that makes a big difference.
For such a file, you'll have to read line-by-line and find the keyword for each section and then read the data arrays after having found such.
Since there are only 2D node coordinates but three values for the other variables you'll also have to match the input format string to the data section.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by