Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
plz help me , why this code is not working ?
조회 수: 2 (최근 30일)
이전 댓글 표시
m = .02
p = .4
t = .12
x = [0 : .01 : .75]
for i = 1 : length(x)
z(1, i) = (.5 * nacathick(t, x(i)) + nacacamber(m, p, x(i)))
z(2, i) = (-.5 * nacathick(t, x(i)) + nacacamber(m, p, x(i)))
end
댓글 수: 3
Walter Roberson
2013년 5월 2일
And also thick().
It would help if you indicated the difference between what you observe and what you would like.
Image Analyst
2013년 5월 2일
And what, if anything, does it have to do with the MATLAB Coder toolbox? http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
답변 (2개)
Jan
2013년 5월 2일
편집: Jan
2013년 5월 2일
Beside other not useful things, "clear all" removes all breakpoint in the code. Therefore it impedes debugging. But debugging is the best way to solve problems!
So I suggest to omit the "clear all" (and most likely neither clc nor close all are useful also), set a breakpoint in the first and step through the code line by line to inspect, what's going on.
Btw., who suggests such cruel clearing headers like "clc; close all; clear all"? It appears such frequently in the code of beginners that I assume they should be kept away from the debugger for any evil purposes. "clc" hides even valuable warning messages in the command window - how strange.
It would be very nice and useful, if the knowledge, that eval and numbered names of variables like "A1", "A2", ... should be avoided, would be such wide-spread as the "clear all" killer.
댓글 수: 0
shambhu kumar
2013년 5월 2일
댓글 수: 1
Jan
2013년 5월 2일
If you want to get assitence, it would be useful to explain "this code is not working" with any details. Do you get an error message or does the result differ from your expectations?
Did you follow Image Analyst's valuable suggestion to read "How to get a fast answer"?
Youssef and Walter asked for the thick() and camber() functions. As far as I can see, you have renamed them now to nacathick() and nacacamber(), but this does not change anything substantially.
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!