Effacer les filtres
Effacer les filtres

"index exceeds matrix dimensions" error

1 vue (au cours des 30 derniers jours)
Dursman Mchabe
Dursman Mchabe le 7 Août 2017
Commenté : Walter Roberson le 26 Mar 2018
What can I change on the quickersim routine (see attached importMeshGmsh.m) so that I can import a gmsh file (see attached reactor2.gmsh file) into matlab.
When I try, I get the "index exceeds matrix dimensions" error.
The error is in importMeshGmsh (line 114) p(1:3,i) = [abcd(2:4)]';
Regards
  7 commentaires
Jeremy Marston
Jeremy Marston le 22 Mar 2018
Modifié(e) : Walter Roberson le 26 Mar 2018
I also got this error message and found by deleting the text between $physicalnames and $EndPhysicalNames, this error message goes away. However, I then encountered a NEW error as follows:
Error using ==
Matrix dimensions must agree.
Error in importMeshGmsh (line 202)
if(sum(t([1 2],el)'==[n1 n2])~=2 && sum(t([2 3],el)'==[n1 n2])~=2 && sum(t([3
1],el)'==[n1 n2])~=2)
Error in ID_Pen (line 7)
[p,e,t] = importMeshGmsh('taper_1.msh');
One thing I noticed is that in the tutorial files, the number of elements is precisely double the number of nodes, whereas in my own msh file, they are the same...!
Can anyone help me fix this ?
Walter Roberson
Walter Roberson le 26 Mar 2018
As the original importMeshGmsh is no longer attached, this question would appear to relate to the Gmsh toolbox, http://gmsh.info/doc/texinfo/gmsh.html . However, we would probably need to know which version of the code you are using, and an example file would help.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by