Question

Module 3 Reading and Writing Code One of the things to learn in this course is OD. how to use Matlab or other computational tools for helping to solve Statics and other Engineering problems. The best way to learn how to code is by reading code. Belovw are several un-commented code snippets for computing things you will encounter in Statics. For this discussion first, describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. Hint: all arrays are components of vectors [ x, y, z] Next, write a section of code as described below Make your first posting by Thursday and two replies to other students by the end of the module week.Code 1 V1 0, 1, 2 ]; V2 3, -4, 5 ]; z=3; Note:must be at the end of the line as it is the Matlab way to continue a statement on the next line. Code 2 v1 = [0, 1, 2); V2 = [ 3,-4, 5); x 1; y 2; Code 3: Mag sqrtsumV 2 D; Lambda-V./ MagCode 4 r1 0.3, -0.4, 0.5 ]; r2 - r1+ v; r1Xf -cross(r1,v); r2Xf - cross(r2,v); isequal(r1Xf, r2Xf) What should be the result of this snippet? Your Code Write a code to compute all 6 permutations of the mixed triple product (Equation 3.37) of the three vectors Then change the first vector to, f - 21+3j+5 k and compare the results. To make this easier type the commands help dot and help cross into Matlab Upload your code and results in the next Canvas page.

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Module 3 Reading and Writing Code One of the things to learn in this course is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Describe what each code snippet does and how it might be used in Statics. Describe in...

    Describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. Hint: all arrays are components of vectors [ x, y, z ]. Code 1 V1 = [ 0, 1, 2 ]; V2 = [ 3, -4, 5 ]; x = 1; y = 2; z = 3;...

  • MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms w...

    MatLab Engineering Describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed by each code snippet. What is input to the calculation and what results are given? Give definitions not numbers. All of these involve some concept covered in this module. Code 1 Magnitude = 5; Angle = 210; X = Magnitude * cosd( Angle ) Y = Magnitude * sind( Angle ) Code 2 Xcomponents...

  • A key point is that in Matlab the equals sign, "=", is an assignment. It takes the result of what...

    A key point is that in Matlab the equals sign, "=", is an assignment. It takes the result of what is on the right side and puts it in the place named on the left side. Matlab is a script language so it works one line at a time from top to bottom. For this discussion describe what each code snippet does and how it might be used in Statics. Describe in general terms what Statics calculation is being performed...

  • How to do question B 2,3,4,5? 3. a) Find the solution v ote ordinary diferetinl equation with the initial coditions: b)...

    How to do question B 2,3,4,5? 3. a) Find the solution v ote ordinary diferetinl equation with the initial coditions: b) i) Recast our third ord ODE into a system af first order ODEs af the formA.v, where v' = dv/dz f(v) and v = (y, y,y")". You should show all working to find the corresponding matrix A. Do not solve the system. 4 mark Solve it only by hand and show your complete work. Do not use a calculator...

  • wnloads/HW5 pdf Create a MATLAB code to calculate function f (z) = ei8r at any given...

    wnloads/HW5 pdf Create a MATLAB code to calculate function f (z) = ei8r at any given point using Taylor series. Write a script file called myTaylor.m and a function file called myFact.m to do the following: (a) The function myFact.m should return the factorial of a number when sent the number. In the script file: i. Set the starting point as r0-1 and fo = f(d)-6.049647 ii. Ask the user to enter his/her desired point and store it in x1...

  • Course and Section cto EXPERIMENT ac series-Parallel Sinusoidal Circuits OBJECTIVES 1. Measure th...

    Course and Section cto EXPERIMENT ac series-Parallel Sinusoidal Circuits OBJECTIVES 1. Measure the currents of series-parallel R-L and R-C networks using sensing resistors 2. Demonstrate the Pythagorean relationship between the currents of the networks. 3. Measure the phase angles associated with the currents of the networks. 4. Calculate the input impedance of a parallel network using measured values EQUIPMENT REQUIRED Instruments Resistors 1-10-Q, 470-Ω, l-kM (14.W) Inductors 1-10-mH Capacitors 1-0.02-pF I-DMM 1--Oscilloscope 1-Audio oscillator or function generator 1--Frequency counter (if...

  • A group of physics students collected data from a test of the projectile motion problem that...

    A group of physics students collected data from a test of the projectile motion problem that was analyzed in a previous lab exercise (L5). In their test, the students varied the angle and initial velocity Vo at which the projectile was launched, and then measured the resulting time of flight (tright). Note that tright was the dependent variable, while and Vo were independent variables. The results are listed below. (degrees) Time of Flight (s) Initial Velocity V. (m/s) 15 20...

  • Assignment Predator / Prey Objectives Reading from and writing to text files Implementing mathematical formulas in...

    Assignment Predator / Prey Objectives Reading from and writing to text files Implementing mathematical formulas in C++ Implementing classes Using vectors Using command line arguments Modifying previously written code Tasks For this project, you will implement a simulation for predicting the future populations for a group of animals that we’ll call prey and their predators. Given the rate at which prey births exceed natural deaths, the rate of predation, the rate at which predator deaths exceeds births without a food...

  • Notes for lab dc02-Resistors and the Color Code will skip are Part 2 e, g: Part 4; Exercises 2, 4,5,6 an...

    Notes for lab dc02-Resistors and the Color Code will skip are Part 2 e, g: Part 4; Exercises 2, 4,5,6 and 3. It is important to answer the exercises correctly in each labl you should include the appropriate prefix for the unit in the Numerical Value We will not be Volt using the Volt-Ohm meter (VOM) for this lab, so skip the parts that ask for VOM measurements. The parts we You do need to complete Exercises1 Note that in...

  • I only need help with the discussion there are many info that you do not need put I put just in ...

    I only need help with the discussion there are many info that you do not need put I put just in case as well as my data table. please do it as soon as u can Meauements ODeit1 Check2 Meaurements Checi3 Ced Check5 Check6 Measurements Check7 heck8 4058 33 536 1502 1035 979 119478 041 1.0319|0.554972| 64261| 153|15542033681 995781 5266566 1578807 298h 1631 119 1209430016 079096812 0.418135246 0,00032665 011890:004668155728441 0293237 1.291809502 1.22833 1.28 1952 -1116 4281 140616885511984206317 3346 8162 0.78...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT