Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can i store the values of a polynomial equations in a for loop condition?

1 回表示 (過去 30 日間)
gdwn mmbrv
gdwn mmbrv 2020 年 10 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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

回答 (1 件)

David Hill
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]):');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by