[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
for loop taking output as input for the next iteration in loop
From: |
naryana.shankara |
Subject: |
for loop taking output as input for the next iteration in loop |
Date: |
Wed, 30 Aug 2017 19:46:08 -0700 (MST) |
Here's my code:
%hwk1_6
clc
clear all
A = [1 1; 1 0]
X = [1 0; 0 1]
for a = 1:5
X*A
end
My lab partner and I spent about an hour and a half trying to get octave to
take the output and then use it as the new input in this fashion:
Compute X k+1 = AX k , for k = 1, 2, . . . , 5 using a for loop and report
the results for each
k in the work you turn in.
We tried various methods and either got errors or whiskey tango foxtrot. We
both know we're missing so simple. Can you provide assistance?
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- for loop taking output as input for the next iteration in loop,
naryana.shankara <=