For loop not working for my equation.
조회 수: 1 (최근 30일)
이전 댓글 표시
This is my for loop.
for gra=m && yint=c
x = (gra-c)./ (m-2)
y = m.*x+c
end
Although I cant get it to work. It is in regards to http://www.mathworks.com.au/matlabcentral/answers/123251-solving-linear-equations-simultaneoulsy
댓글 수: 0
채택된 답변
Image Analyst
2014년 3월 26일
You can't do that. Not sure what you're wanting to do but try to write it like this
for gra = graStart : graStep : graEnd
You give it 3 values, a starting value, an increment, and an ending value. You don't have that - you have a mess. Try to correct it.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!