I have a function used to loop through a data set and I want it to stop once the data reaches a specific threshold (In this case, the failure displacement value 'fdValue'. However, I keep getting the error for the if statement:
Undefined function 'ge' for input arguments of type 'cell'.
I think 'cellfun' can be used in this case but I'm not sure how to use it. Any Suggestions? Below is the function
totalRect = 0;for j = 2:length(bridgeDisp) %Calculations
rectangle1 = (bridgeDisp(j, 1) - bridgeDisp(j-1, 1))*((bridgeLoad(j, 1) + bridgeLoad(j-1, 1))/2); totalRect = totalRect + rectangle1; %If statment error
if bridgeDisp(j, 1) >= fdValue break; endend
Best Answer