Matlab - simple plot where 0<x<5

  • Context: MATLAB 
  • Thread starter Thread starter Elemc
  • Start date Start date
  • Tags Tags
    Matlab Plot
Click For Summary
SUMMARY

The discussion focuses on how to create a plot in MATLAB that excludes the endpoints 0 and 5 on the x-axis. The user seeks a solution to avoid whitespace around the data points. The recommended approach involves using the 'axis' or 'xlim' functions to define the plot area precisely. Relevant documentation links from Mathworks are provided for further reference.

PREREQUISITES
  • Familiarity with MATLAB plotting functions
  • Understanding of axis manipulation in MATLAB
  • Basic knowledge of MATLAB syntax
  • Access to Mathworks documentation
NEXT STEPS
  • Explore the 'axis' function in MATLAB for custom plot limits
  • Learn about the 'xlim' function for setting x-axis limits
  • Investigate MATLAB's plotting capabilities for advanced visualizations
  • Review examples of MATLAB plots without whitespace around data points
USEFUL FOR

MATLAB users, data analysts, and anyone interested in customizing plots to enhance visual clarity and precision.

Elemc
Messages
9
Reaction score
0
Hi

This has got to be easy but I can't find the answer anywhere. How can I use 'plot' where the x-axis does not include the end points 0 or 5? All the examples I see are things like x=[0:0.1:5].

Thanks in advance.
 
Physics news on Phys.org

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K