Can not use a single value to express the color value

4 ビュー (過去 30 日間)
佳钦
佳钦 2023 年 3 月 14 日
編集済み: 埃博拉酱 2024 年 11 月 23 日
th = [0 pi/6 pi/2 2*pi/3];
r = [1 2 3 4];
c = [1 2 3 4];
polarscatter(th,r,[],c)
colormap(gca,'winter')
I run this code from the website.
Then I got the message that:
警告: 当用作索引时,冒号运算符需要整数操作数。
> 位置:mode
位置: matlab.graphics.chart.primitive.internal.AbstractScatter/cacheLegendIconColors
位置: matlab.graphics.chart.primitive.internal.AbstractScatter/doUpdate
警告: 更新 Scatter 时出错。
Index in position 1 exceeds array bounds. Index must not exceed 1.
If someone know how to deal with it

回答 (1 件)

埃博拉酱
埃博拉酱 2024 年 11 月 23 日
編集済み: 埃博拉酱 2024 年 11 月 23 日
我无法复现这个问题,你是否还作了其它图像?

カテゴリ

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

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!