Write a MATLAB function called myPlot that produces no inputs and takes as inputs x-data, y-data, title, x-label and y-l

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a MATLAB function called myPlot that produces no inputs and takes as inputs x-data, y-data, title, x-label and y-l

Post by answerhappygod »

Write a MATLAB function called myPlot that produces no inputsand takes as inputs x-data, y-data, title, x-label and y-label of agraph. The function should plot the data with a grid and place allthe labels appropriately on the graph. The function should check ifthe size if the xdata and the y-data are equal. If they are notequal, the function pads the ending of the shorter vector withzeros, such that they are the same length, and then continues withthe plotting.
Write A Matlab Function Called Myplot That Produces No Inputs And Takes As Inputs X Data Y Data Title X Label And Y L 1
Write A Matlab Function Called Myplot That Produces No Inputs And Takes As Inputs X Data Y Data Title X Label And Y L 1 (121.22 KiB) Viewed 76 times
Q2: Sample output from using the following code snippets: myPlot([1 2 3], [1 2 3 4], 'Test One', 'Test X Label', 'Test Y Label'); figure; myPlot([1 2 3 4], [1 2 3], 'Test Two', 'Test X Label', 'Test Y Label'); Figure 1 File Edit View Insert Iools Desktop Window Help DE Test Y Label 4 3.5 2 1.5 1 0 0.5 1 Test Title 1.5 Test X Label 2 2.5 3 X Figure 2 File Edit View Insert Iools Desktop Window Help 18 H 3 2.5 Test Y Label ir 0.5 =' 0 1 5 1.5 2 Test Title 2.5 Test X Label 3 3.5 4 X
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply