Clear Filters
Clear Filters

xlim is not working

42 views (last 30 days)
Chang seok Ma
Chang seok Ma on 3 Dec 2021
Commented: Ajay S on 26 Dec 2022
I am trying to use xlim to limit my x-axis
h_to_plot = linspace(1,20,20);
horizon = 1:1:20;
quant = 1.64;
mat = [coefficients ses [1:1:20]'];
[~,idx] = sort(mat(:,1));
sortedmat = mat(idx,:);
hold on
xlim = ([0 20.5])
However, I could not make x-axis starts from 0 to 20.5
Is there any way I could use xlim to extend my x axis to 20.5?

Accepted Answer

VBBV on 3 Dec 2021
xlim([0 20.5]) % difference
Difference in using and = between the xlim and parenthesis
  1 Comment
Ajay S
Ajay S on 26 Dec 2022
bruh can you please make it a bit more clear

Sign in to comment.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!