How to fix code?
이전 댓글 표시
I am using matlab for the first time. When I make a mistake or a fat finger but do not catch the mistake before hitting enter, is there a way to go back and fix this? My teacher says he does not know of a way other than re typing entire program again. Seems odd that if you get all the way through your program and there is a typo that you have to completely reenter all code.
Thanks!
채택된 답변
추가 답변 (3개)
Azzi Abdelmalek
2013년 11월 1일
0 개 추천
You can undo by typing ctrl+z
댓글 수: 2
Azzi Abdelmalek
2013년 11월 1일
Jhon commented
So if the error is at the beginning of the program will ctrl+z get rid of all code after the mistake or just the mistake? By mistake I mean I enter a 4 instead of a 2, just a fat finger.
Thanks,
Azzi Abdelmalek
2013년 11월 1일
This is not clear for me, can you explain what you mean by go back and fix the error, maybe I misunderstood you
John Foster
2013년 11월 1일
0 개 추천
댓글 수: 4
Azzi Abdelmalek
2013년 11월 1일
Is this an answer or a comment? if you want to add a comment, click on [comment on this answer]
Image Analyst
2013년 11월 1일
I'm still not sure if you know how to edit your code or not? Are you all set now, or do you still have questions about how to do it? I'm sure your professor knows how to edit code - there must have been some kind of miscommunication between you two. He didn't know what you were asking or thought he was asking a different question or something.
John Foster
2013년 11월 3일
Image Analyst
2013년 11월 3일
John, entering it into the command line is not for multiple lines of code unless you want the problem of having to hit up arrow or retyping. Virtually everyone uses text windows unless it's for just a line or two. If using the text editor works for you, and I helped you discover this, mark my answer (not yours) as Accepted. Thanks.
per isakson
2013년 11월 3일
편집: per isakson
2013년 11월 3일
0 개 추천
Watch the video
There are more
IMO: They are good
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!