Question
I have 5 coefficents: for example: a = [2 3 4 5 6] And I want to draw a plot a1 + a2*t + a3*t^2 + a4*sin(t) + a5*cos(t) how to do this?
Expert Answer
Prashant Kumar
PhD Expert
Answered Aug 24, 2026
If t is already defined as a numeric vector, then:
y = a(1) + a(2)*t + a(3)*t.^2 + a(4)*sin(t) + a(5)*cos(t); plot(t, y);
If t is a symbolic variable, I believe you could use the same y, but afterwards you would either have to subs() in actual numeric values or else you would have to use ezplot()
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related matlab Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →