Unexpected fault in input
이전 댓글 표시
For a reason i can not understand MATLAB constantly stops when i try to use input command in a for repeat!!!!
What's wrong with it?! please help
_LI.jpeg)
댓글 수: 3
Walter Roberson
2018년 11월 18일
what is an example of what you input in response to the prompt ?
Walter Roberson
2018년 11월 18일
why does it think that line 267 to enter force is a comment ? There is no obvious % commenting it out . Does the line above it have a ... on it?
eden hazard
2018년 11월 18일
답변 (1개)
You did not enter any value, so FF is empty.
Any empty array cannot be expanded to fill the non-empty locations that you have specified with subscript indexing.
댓글 수: 10
eden hazard
2018년 11월 18일
"it is instantly showing the fault before the input command..."
Your error message shows that the error occurs on line 270, which is after the input command.
"so i am not able to write the [Fx,Fy,Fz] i want."
You have not explained what you want, so we have no idea if it is possible or not.
Note that defining FF on line 265 serves no purpose, because you redefine FF on line 269.
eden hazard
2018년 11월 18일
eden hazard
2018년 11월 18일
편집: eden hazard
2018년 11월 18일
Stephen23
2018년 11월 18일
Interesting. For me your code fails on line 372 or 380 with an indexing error. I don't get any problems with input.
eden hazard
2018년 11월 18일
Stephen23
2018년 11월 18일
I think the code skipped those lines entirely. I never got that prompt. What magical combination of input values will get me there?
eden hazard
2018년 11월 18일
Walter Roberson
2018년 11월 18일
With those inputs, for me it fails on line 379
Nodes=R(2:33,1:4);
This is because the textscan() inputs almost nothing. It is
C = textscan(fileID,'%f %f %f %f %f %f %f',N,'CommentStyle','//');
however the first line with 7 input values in the file is line 166 so the textscan fails almost immediately.
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!.png)
