MATLAB: About plotting piecewise function. piecewise why Matlab says index exceeds matrix dimensions at line 3? Thanks Best Answer See if using:for k = 1:length(t)instead, works correctly in your code. Related SolutionsMATLAB: Writing a piecewise function. Your teacher probably expects you to use logical indexing.y = nan(size(t));mask = t < 0;y(mask) = 0;mask = ...y(mask) = x1(mask);... MATLAB: How to plot point with marker like a dart Seedoc feather Related QuestionQuestion about sprintf function.
Best Answer