[SOLVED] Lab for MatLab 243
Im studying for my Computer Science class and need an explanation.
EEC 243 Introduction to Programming – MATLAB
Lab 3: Introduction to MATLAB Programming
Tasks
- Write a simple script that will calculate the volume of a hollow sphere,
- For a bubble, the surface tension force in the downward direction is
- Plot sin(x) for x values ranging from 0 to p (in separate Figure Windows):
- Write a script that would create a 5×5 matrix of random integers.From this, create another matrix variable which is the middle 3×3 part of the original matrix.Write this new matrix to a file.
- Atmospheric properties such as temperature, air density, and air pressure are important in aviation.Create a file that stores temperatures in degrees Kelvin at various altitudes.The altitudes are in the first column and the temperatures in the second.For example, it may look like this:
where ri is the inner radius and ro is the outer radius.Assign a value to a variable for the inner radius, and also assign a value to another variable for the outer radius.Then, using these variables, assign the volume to a third variable.Include comments in the script.Use help to view the block comment in your script.
Fd = 4 ?Tr
where T is the surface tension measured in force per unit length and r is the radius of the bubble.For water, the surface tension at 25C is 72 dyn/cm.Write a script surftens that will prompt the user for the radius of a water bubble in centimeters, calculate Fd, and print it in a sentence (ignoring units for simplicity).Assume that the temperature of the water is 25C so use 72 for T.
- using 10 points in this range
- using 100 points in this range
1000288
2000281
3000269