error in figure in matlab

it not show to me a red dashed line with stars.
what can i do ??
the code is :
figure();
plot(V_X(1,:),V_X(2,:),'k');
hold on;
plot(matrixV(1,:),matrixV(2,:),'--r*')
title(['גרף כוח הגזירה כאשר החלוקה N = ',int2str(n)]);
xlabel('x');
hold off ;

回答 (1 件)

dpb
dpb 2021 年 1 月 13 日
編集済み: dpb 2021 年 1 月 14 日

1 投票

It is, only you have so many points they're all on top of each other instead of being able to distinguish individual points.
You can see this in the present figure if you look very closely at the two ends -- you can see the little points of the first and last marker.
Set
xlim([0 1])
and you'll also see when there's more room.
For a more general solution, try something like
Npts=size(V,2);
nPlt=100;
nBetween=ceil(NPts/nPlt);
plot(matrixV(1,1:nBetween:end),matrixV(2,1:nBetween:end),'--r*')
Adjust nPlt to taste...

2 件のコメント

madhan ravi
madhan ravi 2021 年 1 月 13 日
+ 1 , I really like the way how you loosened the data;) using ceil().
dpb
dpb 2021 年 1 月 14 日
Thanks...same idea came up just a couple weeks or so ago and I forgot to round the step variable having chosen an evenly divisble set of values in my check code. Of course the poster's sizes weren't. Didn't forget this time... :)

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

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

質問済み:

2021 年 1 月 13 日

コメント済み:

dpb
2021 年 1 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by