Combining 2 command, difficulty to combine plot in a single x and y range.

HI I have diifficulty on combining 2 plot here in a single x and y coordinates. I got erros when i combine these 2 plots.
Basically i want a plot horinzontal from 0 to 2e9 at -12 and 2.1e9 to 11.1e9 with the equation.
x=[0.01e9,2e9];
y=[-12,-12];
hold on
plot(x,y,'-.or')
x=(2.1:0.1:11.1)*1e9;
y=[-6.68+12.1*log10(x/1e9/5.5)];
hold on
plot(x,y,'-.or')

4 件のコメント

madhan ravi
madhan ravi 2019 年 5 月 17 日
What do you mean not the same??
zahrein yaacob
zahrein yaacob 2019 年 5 月 17 日
Hi Ravi, Sorry for the confusion. Basically i want to combine this plot into a single x and y range. I tried the below equation, but fail to understnad the errror. Can help? Appreciate your feedback.
x=[0.01e9,2e9,(2.1e9:11.1e9)];
y=[-12,-12,-6.68+12.1*log10(x/1e9/5.5)];
hold on
plot(x,y,'-.or')
KSSV
KSSV 2019 年 5 月 17 日
YOu are creating huge array.....whats the necessity for that?
zahrein yaacob
zahrein yaacob 2019 年 5 月 17 日
Should be fine in a log scale.

サインインしてコメントする。

回答 (0 件)

カテゴリ

タグ

質問済み:

2019 年 5 月 17 日

コメント済み:

2019 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by