How to add minor ticks to a graph from the command lines?

E
Evasmith95 · Aug 28, 2020 · 1.9K views
Question
I want to to add the Minor Ticks from the command line. Currently, I'm editing the Major Ticks as follows: set(gca) set(gca,'XTick',0:1:7) set(gca,'YTick',-1:0.5:1) but I did not find any documentation for the minor ticks. I hope to find someone familiar with this subject.
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Aug 24, 2026

Is this what you want?

 

set(gca,'XMinorTick','on')
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

Get a Free Consultation or a Sample Assignment Review!