# matlab does not plot the from origin

1 view (last 30 days)
Xingda Chen on 6 Apr 2020
Commented: Xingda Chen on 6 Apr 2020
trying to plot my lab result, but the first data point suppose to be (0,0) , can't make matlab plot that....does this happen to everyone?
function phase_freq(f1,p1,f2,p2,f3,p3,f4,p4,f5,p5,f6,p6,f7,p7,f8,p8,f9,p9,f10,p10)
f(1)=f1;
f(2)=f2;
f(3)=f3;
f(4)=f4;
f(5)=f5;
f(6)=f6;
f(7)=f7;
f(8)=f8;
f(9)=f9;
f(10)=f10;
p(1)=p1;
p(2)=p2;
p(3)=p3;
p(4)=p4;
p(5)=p5;
p(6)=p6;
p(7)=p7;
p(8)=p8;
p(9)=p9;
p(10)=p10;
for i = 1:10
phase(i) = (p(i)/f(i))*360;
end
F = [0 3.3 3.76 7.56 11.40 15.29 19.23 23.21 27.24 31.32];
plot(F,phase,'-.r*')
xlim([0 32]);
xticks(F);
%xticklabels({'0','3.3', '3.76' '7.56', '11.40', '15.29', '19.23', '23.21', '27.24', '31.32'});
xlabel('frequency difference in khz')
title('constant coupling')
##### 2 CommentsShowHide 1 older comment
Xingda Chen on 6 Apr 2020
yeah.thanks. stupid mistake!

### Community Treasure Hunt

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

Start Hunting!

Translated by