Mathlab doesn't show Graph

13 ビュー (過去 30 日間)
Marin
Marin 2024 年 5 月 8 日
回答済み: SACHIN KHANDELWAL 2024 年 5 月 28 日
Can someone tell me why my matlab doesn't show the graph?I'm getting the results i want but it doesn't show the graph.
Thanks !

回答 (1 件)

SACHIN KHANDELWAL
SACHIN KHANDELWAL 2024 年 5 月 28 日
Hi @Marin,
If you're trying to see a graph in MATLAB but nothing shows up, it's probably because MATLAB typically draws lines connecting multiple points, and you've only plotted one point.
Without a second point to connect to, there's no line to display. To see your single point on the graph, you can tell MATLAB to use a specific symbol, like a circle ('o'), to mark the spot. Here's how you can do it in code:
masa = 2;
densitate = 0.1333;
plot(masa, densitate, 'o'); % This will plot a single point with a circle marke
Hope it helps!

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by