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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!