Ch8_MATLAB

pdf

School

Northeastern University *

*We aren’t endorsed by this school

Course

1502

Subject

Mathematics

Date

Apr 3, 2024

Type

pdf

Pages

5

Uploaded by JudgeStar17662

Report
Gillen - GE1502 - Challenge 8 Please complete the following MATLAB plotting problems. Note, | want you to use coding, not the figure window, to edit features like axis title. Tip: If your plot is not appearing as expected, you may need to run "clf" to get a clear figure window. 1. Plot f(x) = x’ 5x+ | and its derivative f'(x) = 3x> 5 for x values ranging from -2 to 4, incrementing by 0.01. Plot the function with a solid black line, and the derivative with a dashed black line. Use plot and not fplot for this problem. Label the x axis. Plot both functions in the same figure window. X=-2:0.01:4; y=X."3-5*%x."2+1; dydx=3*x.72-5; plot(x,y,'k',x,dydx,'k--') xlabel('x-axis"'); 50 40 + /1 X-axis 2. A 3D epitrochoid (a type of parametric line) is given by x(t) = 7cos(t) SCOS( (% + t)t), y(r) = 7sin(t) Ssin( (% + t)t), and z(7) = t . Plot the function for t values ranging from 0 to 30, incrementing by 0.01. Color the lines red and title the plot "3D Epitrochoid." t=0:0.01:30; x=7.*cos(t)-(5.*cos((.75+t).*t)); y=7.%sin(t)-(5.*%sin((.75+t).*t)); z=t; plot3(x,y,z,'r") title('3D Epitrochoid’);
3D Epitrochoid 10 3. The following is a plot of velocity over time for a moving object. Recreate this in MATLAB by creating two arrays for x and y coordinates respectively and then plotting them. Set the axis limits to 0 <x<30and 5 < y <5. Label the axes and use a dashed blue line for the plot. Note, the MATLAB generated line will not look exactly the same due to the spacing of the grid, but the similar shape should be evident. opur sxshyd velocity (m/s) o e o= X=0:30; y=[4 3210 -1-2-3-4-4-4-4-4-3-2-10000012344441424A4], plot(x,y,'b--') axis([@ 30 -5 5]) xlabel('time (s)') ylabel('velocity (m/s)’)
5 \ e \ / \ / iy \ / w \ / E; \ / LU TP 8 A / o \ / g 3 / \ / \ / \;-___/ -5 A A A A A 0 5 10 15 20 25 30 time (s) 4. Using a combination of subplot and fplot, generate 4 plots in a 2x2 grid, each of a different function and in a different color. Label each plot with a title displaying the function (e.g., y=2x+3). Choose any functions and range for x you like. subplot(2,2,1) fplot(@(x)x.”~2,[-3 3], 'k") title('x"2") subplot(2,2,2) fplot(@(x)x.~4, [0 6],'r") title('x"4") subplot(2,2,3) fplot(@(x)x.”~3, [-3 3],'b") title('x”3") subplot(2,2,4) fplOt(@(X)X: ['3 3]: lp') x? x* 8 1000 6 4 500 2 0 0 i 0 2 0 2 4 6 x3 w A 0 0 & -20 2 4 2 0 2 = 5 0 2 5. Using https://patents.google.com/ and any engineering/technology search term of your choosing (e.qg., weedwacker), collect data on the number of search results for the years 2010 - 2020. See the screenshot below as an example, modify the dates to collect data for each year (e.g., 2010-2011, 2011-
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2012, etc). The data | might collect could look like: 43,182 results for 2010, 67,301 results for 2011, 23,919 results for 2012, and so on... You must meet the following requirements: » Store the data in an excel file and read the data into MATLAB with xIsread. » Using this data, plot the search results and years as a bar graph. Use bar() in the format bar(years, search results). » Add axis labels and a title. Google Patents (weedwacker) SEARCH TERMS X About 135,808 results Sort by - Relevance ~ Group by - None ~ Deduplicate by - Family ~ F weedwacker X + Synonym + Synonym Weed trimming apparatus, weed trimmer head, and trim US - US10440881B2 - Orlando Jerez « Orlando Jerez Priority 2007-08-10 - Filed 2017-03-28 « Granted 2019-10-15 « Published 2019- claim 1 further comprising a protective glider operatively connected to the trir cooperable with the protective glider such that the protective glider is configui (™ Date - Priority - of and relative to any rotation of the trimmer head. SEARCH FIELDS YYYY-MM-DD YYY-MM-DD _ _ _ _ Spool for straight through line feed vegetation trimmer ¢ US - US9924631B2 - George E. Alliss * George E. Alliss = +Inventor Priority 2008-04-22 - Filed 2016-12-12 « Granted 2018-03-27 - Published 2018- mounting the trimmer head to a trimmer machine; providing said spool with a year_data = readmatrix( 'Challenge 8.xlsx', 'Range’', 'Al:K1'); search_data = readmatrix( 'Challenge 8.xlsx', 'Range', 'A2:K2'); bar(year_data, search_data) ylabel('# of Searches') xlabel('years") title('Number of fishing reel searches by year')
clf # of Searches 25 15 0.5 x10* Number of fishing reel searches by year Ll | T N B | | | | | ] | N B 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 years 1 1