This class code was deleted after i did it so this was redone after the fact
This is only a section of code and the output. This section was meant to experiment with the fprintf function. Each segment is divided by a percentage sign. The cows segment was meant to show that the function can show different values and that the value updates as the variable updates. It doesnt update retroactively but effectively, the same line of code can print two different values. The segment with the variable named voltage is to show that one can change how much of the number one can show (number of digits and decimal places). For the temp section it is being shown how the fuction handles arrays and matricies.
This segment is much like the temp segment but we did it ourselves. This is the same concept, but doled out a little more
This is the same concept except starting out with a word problem
Using functions to solve yet more word problems. good practice
This is to show how to use some of matlabs math functions. Also that they work with arrays. It is also important to note how these numbers handle complex numbers. imaginaries can be important when analyzing certain phenomenon such as phasors for example. Having this two part number stucture is nice to have.
These are different ways to make a square root. Basically don't use nth root function because it cant handle unreal numbers. And doing a fraction of an exponent works the same way
this is one way to skin a cat. get it : D. jkjk but really it's nice to have options.
These are some other matlab functions executed with arrays. ooooooooh aaaaaaah.
Personally i like the sign function.
No comments:
Post a Comment