Create a row vector x that starts at -2, ends at +2 with a step size of 0.5.
Use x to create a vector y using the following equation: y = 3x^2 + 2x - 6
Sign in to comment.
Direct link to this answer:
x = -2:0.5:2;%creates an array x with elements -2 to 2 with step size 0.5
y = 3*x.*x + 2*x -6
Direct link to this comment:
Sign in to answer this question.
Opportunities for recent engineering grads.
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office