Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a documented MATLAB script called HW1_3.m that does all of the following: Creates variables El = 3 and L = 2 (these are just

image text in transcribed

Make a documented MATLAB script called HW1_3.m that does all of the following: Creates variables El = 3 and L = 2 (these are just scalars). Creates a vector x with exactly 100 values from x = 0 to x=L(inclusive) hint: use linspace. Creates a vector P with values between 0 and 1.5, spaced every 0.1 kN, inclusive. So the vector p must contain exactly the values: 0, 0.1, 0.2, 0.3, ..., etc. ..., 1.3, 1.4, 1.5. Creates a MATRIX Y for which each row in Y is the result y(x) for one particular value of P. For example, when you're done, I expect the final matrix Y to look like: 0 0 - 0 0 All the values y(x) for P = 0 (all y s should be = 0) 0 . . . . All the values y(x) for p = 0.1 (should start to see deflection for x > 0) Y 0 . .... All the values y(x) for p = 1.4 0 .- All the values y(x) for p = 1.5 (should have max deflection) etc. etc. What's the catch? NOWHERE in your code can you use FOR or WHILE or IF commands!!! You must think how to do the calculations in a "vectorized" way, as discussed in Class 2. Creates a plot of all the y(x) lines, one for each force P, on top of each other in one graph. I expect to see 51 lines on the same plot! This should be as easy as just using the single command Make a documented MATLAB script called HW1_3.m that does all of the following: Creates variables El = 3 and L = 2 (these are just scalars). Creates a vector x with exactly 100 values from x = 0 to x=L(inclusive) hint: use linspace. Creates a vector P with values between 0 and 1.5, spaced every 0.1 kN, inclusive. So the vector p must contain exactly the values: 0, 0.1, 0.2, 0.3, ..., etc. ..., 1.3, 1.4, 1.5. Creates a MATRIX Y for which each row in Y is the result y(x) for one particular value of P. For example, when you're done, I expect the final matrix Y to look like: 0 0 - 0 0 All the values y(x) for P = 0 (all y s should be = 0) 0 . . . . All the values y(x) for p = 0.1 (should start to see deflection for x > 0) Y 0 . .... All the values y(x) for p = 1.4 0 .- All the values y(x) for p = 1.5 (should have max deflection) etc. etc. What's the catch? NOWHERE in your code can you use FOR or WHILE or IF commands!!! You must think how to do the calculations in a "vectorized" way, as discussed in Class 2. Creates a plot of all the y(x) lines, one for each force P, on top of each other in one graph. I expect to see 51 lines on the same plot! This should be as easy as just using the single command

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2. Document data as evidence in complete and detailed notes.

Answered: 1 week ago

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago