Determine the maximum force, of your 1000 random forces, for which the cylinder will not fail. Determine the minimum force, of your 1000 random forces, for which the cylinder will fail. Output both values to the workspace.
Show older comments
Originally a matrix is made using: F=35.*rand(1000,1)
Now the force can't exceed the value of this expression: (75*(pi*(.5.^2)/4))
This means the force can't exceed appx. 14.7N but the matrix made has random forces from 0-35N. I am trying to use an if or while or for statement, example: F_max=max(F) F_max<(75*(pi*(.5.^2)/4)) while j=F_max
if F<75*(pi*(.5.^2)/4)
disp('F_max=ans')
end
end
or
if F<(75*(pi*(.5.^2)/4))
X=max(F)
end
But when the max(F) is found, it does not satisfy the previously stated condition. I tried to make it a string but this still found max of the total. How can I use a statement, that will utilize the condition to find the max?
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!