I wanna start x-axis from 1500.Is there function for that. using axis([1500 1600 0 inf]) doesnt work

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 3일

0 개 추천

Use xlim and ylim

댓글 수: 8

sashish acharya
sashish acharya 2016년 4월 3일
It shows blank fig....actually i wanna show x-axis in term of wavelength starting from 1500
Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 3일
xlim([1500 inf])
sashish acharya
sashish acharya 2016년 4월 3일
Its out of range
Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 3일
You asked how to set x-axis from 1500, that's what the picture shows, what is you problem?
sashish acharya
sashish acharya 2016년 4월 3일
But sir its not showing the graph...I want graph in that range starting form 1500 instead of zero.
Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 3일
xt=get(gca,'xtick')
xt1=linspace(1500,1600,numel(xt))
xtck1=arrayfun(@num2tr,xt1)
set(gca,'xticklabel',xtck1)
Jon
Jon 2016년 4월 3일
편집: Jon 2016년 4월 3일
You have no data at x=1500, so why would you want to start it there? If you mean that you want to relabel the x-axis, you can use
xticklabels = get(gca,'xtick');
xticklabels = xticklabels + 1500;
set(gca,'xticklabel',xticklabels)
Oh, it looks like you want to convert frequency to wavelength. That has been asked many times, e.g. http://www.mathworks.com/matlabcentral/answers/80537-how-do-i-convert-the-x-axis-of-an-fft-from-frequency-to-wavelength
sashish acharya
sashish acharya 2016년 4월 3일
Thank you..

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

태그

질문:

2016년 4월 3일

댓글:

2016년 4월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by