MATLAB: I have a question regarding time dependent loop, as I want to have a variable changing with time in the loop from 0 to 30 looptimevariable gamma(t) =4-(6/90*t); Best Answer Without loop:t = linspace(0,30,100); % create 100 points between 0 and 30gamma = 4-(6/90*t); Using for loop: t = linspace(0,30,100);gamma = zeros(size(t));for i=1:numel(t) gamma(i) = 4-(6/90*t(i));end Related SolutionsMATLAB: If condition returns no output Replace thisif abs(DE)==1.1921e-07disp(hj)endwith thisif abs(DE)-1.1921e-07<1e-4disp(hj)end MATLAB: I have a code in which the variable changes in every loop iteration for a fixed time point t=5, by assuming that x is changing between 0 and 5, and t=0 to 30. how can I plot the changes I found some mistakes in your code. Look Related QuestionHI I need to find gamma_t in this nonlinearal equation:How to solve this equationHi, i want to plot simple function, Can someone tell me how to plot itProblem with a function
Best Answer