Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Example converting script to function in MATLAB - friction factor
Play lesson

Introduction to Chemical Engineering Computation with MATLAB - Example converting script to function in MATLAB - friction factor

4.0 (3)
32 learners

What you'll learn

This course includes

  • 18.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Full Transcript

Previously, we wrote a simple MATLAB script to compute and plot the Darcy-Weisbach friction factor for a given Reynolds number and value of the relative roughness (Chapter 2). We then updated the script to look at a range of Reynolds numbers (for loop and vectorized, Chapters 3 and 4) plotted the results. Here we start with our script from Chapter 2, and convert it to a function. We then use this within a simple for loop to look at a Range of Reynolds numbers and plot. In the next Chapter (Chapter 6) we will discuss vectoring our functions, and will improve our code one last time. This is Exercise 5.2 from my text "Introduction to Chemical Engineering Computation with MATLAB." A copy of the M-files created during the screen cast may be found below: https://drive.google.com/file/d/1z_zDg6u9QVj7oTwVWFqashoa6E7ZMw49/view?usp=sharing https://drive.google.com/file/d/1j7N6XtCFjHvbV0PtvIlATUwolHzDrxcT/view?usp=sharing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Subscribe: https://www.youtube.com/c/AndrewPaluch?sub_confirmation=1

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere