Updating values with for-loop
Show older comments
Hello everyone,
I want to update the matrix "e" according to the new value of matrix "d" for each iteration.
Matrix "d" is generated in each iteration according to the new maximum value if matrix "f"
clear all
clc
d = zeros(2,4);
a = [2 2;1 1;4 1;1 1;4 2;1 1;3 2;3 1;2 1;1 2];
b= [0 0 0 0;0 1 0 0;1 0 0 0;0 0 0 0;0 0 0 1;0 0 0 0;1 0 0 0;0 0 0 0;0 0 0 0;0 0 0 1;1 0 0 0;0 0 0 0;0 0 0 0;0 0 1 0;0 0 1 0;0 0 0 0;0 1 0 0;0 0 0 0;0 0 0 0;1 0 0 0];
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!