Question: Using MATLAB, write a function to create a fish structure with 10 elements randomly. Breed of all fish should be trout, length should be assigned
Using MATLAB, write a function to create a fish structure with 10 elements randomly. Breed of all fish should be trout, length should be assigned a random integer between 0 and 100, weight should be assigned a random number between 0 and 1. After all 10 fishes are created, check the length of each fish. If the length is not in 20 40 cm range, delete the element from structure. Function should return the created fish structure with at most 10 elements.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
