Question
Asked By RadiantSunset32 at
Answered By Expert
Barry
Expert · 1.5k answers · 1k people helped
The code is given below with comments to help you understand it. Please comment if you have any doubts
The code:
x = 5 :0.05: 20; %defining range according to question
y = sin(x) + 5;
z = cos(x) * 30; %the required two functions
plot(x,y) %ploting xy graph
hold on % hold on the graph in place when we draw the next
plot(x,z) %ploting xz graph
xlabel("x") %labelling the x axis
legend("sin x +5", "cos x * 30") %giving legends to the graph
Screenshot of code and output:
🧑🏫 More Questions
👉 Interested in exploring further?
Chrome Extension
1. Search answers from our 90+ million questions database.
2. Get instantly AI Solutions powered by most advanced models like GPT-4, Bard, Math GPT, etc.
3. Enjoy one-stop access to millions of textbook solutions.
4. Chat with 50+ AI study mates to get personalized course studies.
5. Ask your questions simply with texts or screenshots everywhere.