% This is Main code to call the function
% The function is function[SimData, A_Val, BB_Val] = MM_BG_FuncCall(A,BB)
BG = 3.42:0.05:3.52;B_B = linspace(0.9,1.1,2);for j = 1:length(BG) for k = 1:length(B_B) [alpha, A_Val, BB_Val] = MM_BG_FuncCall(BG(j),B_B(k)); endendclear B_Bclear BGclear jclear k
I am trying to call a function and function is calculating alpha value and every time it is called its giving a [1×79] Matrix, similarly, Everytime the B_B and BG value is changing the function is called and giving out the values, when I try to save the function in the three variables [alpha, A_Val, BB_Val], I am only getting the final (last) result, Though I want alpha to be updated for example first row of alpha should have all [1×79] values, second row should have next [1×79] values and so on for the other two variables A_Val and BB_Val as well. Could any one tell me how can I save all the data that's the called function is calculating?
Thank You in advance
Best Answer