Monday, December 14, 2015

Day5 (lecture 5)

#1

#2 Clausius–Clapeyron equation
 


#3 Ballistics Equations


#4 special trig fuctions



#5 polar graphs



#6 semilog graphs



HW 4


Stress Strain Curve


Polar Geometric Shapes



Moors law curve





The equation is fit with this equations. The 2's seemed to cancel. I dont know if this is the wrong equation. If it is correct, it seems that actual data seems to lag moores law








Day 4 (HW 3)

LRC circuit problem

 * current (Amperes) is the last value (non-imaginary value)

Thermocouple problem
*columns are thermocouple 1,2,and 3
Weather data Problem (precipitation total)
GPS problem


*These test values are from LA to london

This value came from online
Not bad!



Day 4


There was a previous section to this lecture but it wasn't saved. That section was basically telling us how to use trig functions. This is the application of those skills


These variables are quite clear.  The sind function was used so the user can input an angle in degrees, the most comfortable unit of angle.


These are the questions that correspond to the above solutions

1.    What is the maximum value in each column? 
    2.    In which row does that maximum occur? 
    3.    What is the maximum value in each row? (You’ll have to transpose the matrix to answer this question.) 
    4.    In which column does the maximum occur? 
    5.    What is the maximum value in the entire table?

"a" corresponds to the max value being asked for and "b" corresponds to the position of those values
The last number is the max number in the entire matrix. This excersize is important because we are asking for multiple outputs.








     1.    What is the mean value in each column? 
    2.    What is the median for each column? 
    3.    What is the mean value in each row? 
    4.    What is the median for each row? 
    5.    What is returned when you request the mode? 

    6.    What is the mean for the entire matrix?   

The line of questioning above correspond to the solutions above. 






This is another set of solutions








The answer to question four is that they are the same

 1.    Create the following complex numbers:
   a.       A = 1 + i    
  b.       B = 2 + 3i    
  c.       C = 8 + 2i      
2.    Create a vector   D   of complex numbers whose real components are 2, 4, and 6 and whose imaginary components are    -3,    8, and    -16.    
3.    Find the magnitude (absolute value) of each of the vectors you created in Exercises 1 and 2. 
4.    Find the angle from the horizontal of each of the complex numbers you created in Exercises 1 and 2. 



The print out of A,B,C, and D were ommitted because they are unneccessary. Only the answers to the questions are displayed.

After this class ended 


Sunday, December 13, 2015

Day III (HW)

Homework II after 3rd lecture

These are the questions that correspond to these solutions

1.       Factor the number 322. 
2.       Find the greatest common denominator of 322 and 6. 
3.       Is 322 a prime number? 
4.       How many primes occur between 0 and 322? 
5.       Approximate    pi    as a rational number. 
6.       Find 10! (10 factorial). 
Find the number of possible groups containing 3 people from a group of 20, when order does not matter. (20 choose 3)      

*pi is expressed as a fraction because of the short g function




The top is commented out because it is less complicated than the under part and it does the same thing.
the bottom asks the user to input values. Then the final value is outputted in the bottom.



First two sections are for comparing incandescent and cfl lightbulbs. First the joules the appliances and bulbs use up are calculated and summed. Then this is divided by the amount of heat that the ac unit can remove. This will give us the number of AC units we need . However we needed to use the ceil function because we cant buy fractions of an AC unit. The following portion allows for imputs for the number of bulbs and appliances.


These are the questions
1.       Here are some discrete math questions for you to implement in MATLAB. 
a.       If you have four people, how many different ways can you arrange them in a line? 
b.      How many different robotics teams of 7 members can you form from a class of 28 students? (Combinations—order does not matter). 
c.       Since each player on a robotics team is assigned a particular role, order does matter. Recalculate the possible number of different robotics teams that can be formed when order is taken into account.    
d.      There are 52 different cards in a deck. How many different hands of 5 cards each are possible? Remember, every hand can be arranged 120 (5!) different ways.  What are the chances of getting dealt a royal flush

These questions are basically probability questions. The poker one was the hardest but you still basically had to follow the equations and know when the order matters and when it doesn't. In this case we had to divide by four to account for the four suits, thus ways one can get a flush. This might be wrong since i dont know that much about poker.









Saturday, December 12, 2015

DAY III inclass

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.