How to save values from a for loop into a matrix
2 views (last 30 days)
I need to figure out how to store the values from this loop into a pre-initialized matrix called 'save'. I apologize if this is trivial but I am very unfamiliar with matlab.
%NEED TO STORE VALUES FROM LOOP IN 'SAVE' MATRIX
Jan on 24 Nov 2021
Do not use "save" as name of a variable. This would shadow an important built-in function, which causes troubles frequently.
You store the results in the variable dl. So simply use the wanted variable instead:
saved = zeros(4,13)
daved(mm, :) = fsol(iindex(mm));