Hi, Can you please help me out in using prev function to get back the dependent variables from last time step and use those in current timestep during simulation? in simply words how to make comsol work in For loop for certain dependent variables. my problem: theta(1)=0; for i=2:t { xA=c1-bsin(theta(i-1)); yA=c2+bcos(theta(i-1)); m=2(c1yA+c2xA); n=2(c1yA-c2xA); q=2xA^2+2yA^2+c1^2+c2^2-b^2; W=arccos(m/sqrt(m^2+n^2)); theta(i)=arccos(q/sqrt(m^2+n^2))-W; } end
How to write this FOR loop code in comsol? or is there any other ways to do the same task?