power of 10 problem

10 ビュー (過去 30 日間)
Ellen
Ellen 2023 年 12 月 3 日
コメント済み: Dyuman Joshi 2023 年 12 月 3 日
I am working on a script of a much older version of matlab. Figerd out with help of this community waht my problem is. I like to reproduce a diagram with new data. for the axis i have
axis([0.4 8.6 0 0.9]) % ymax is 0.9Mj = 0.9*10^6
But that is in Mj (times 10^6)
my code for the plot is:
bar(1:nos, kin_sector(j,:)/1e6,'FaceColor','none','EdgeColor',cc(j,:),'LineWidth',1.5)
When I change te limit of the y axis to 10000 The plot is what I want.
I assumme my r2023b matlab has a problem with: y= kin_sector(j,:)/1e6
because in the plot it only uses: kin_sector(j,:)
Is there a new way of writing the powers of 10? Ive seen for example 1e+06 but that didnot work either.
should I add an extra rule before plotting deviding the y data en use y in my plot?
what is the easiest way?
Kind regards Ellen
  3 件のコメント
Ellen
Ellen 2023 年 12 月 3 日
移動済み: Star Strider 2023 年 12 月 3 日
The problem lies in the data import. found out that the values of for example pressure were imported as text and not as number. Because of that de values are wrong and dont fit the diagram.
Thnx for the support. Ik have tot check my csv.files
But learning a lot from this errors!
Ellen
Dyuman Joshi
Dyuman Joshi 2023 年 12 月 3 日
Which function are you using to import the data?

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

採用された回答

Star Strider
Star Strider 2023 年 12 月 3 日
‘... values of for example pressure were imported as text and not as number
Use the str2double function to convert them to numbers.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by