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!