Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
gdwn mmbrv
gdwn mmbrv am 28 Okt. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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

Antworten (1)

David Hill
David Hill am 28 Okt. 2020
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