Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can i store the values of a polynomial equations in a for loop condition?
조회 수: 1 (최근 30일)
이전 댓글 표시
count='How many equations do you want?';
vcount=inputdlg(count);
vcount = str2double(vcount{1});
eqprompt='Enter equation: ';
for i = 1 : vcount
answer =inputdlg(eqprompt);
disp(answer)
end
댓글 수: 0
답변 (1개)
David Hill
2020년 10월 28일
You could enter all of your equations at once in the form of a matrix, padding any polynomial equations with zeros if they are of a lower degree than the highest degree equation.
p=input('Polynomial equations in the form of a matrix ([1 2 3 4;0 1 2 3]):');
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!