Substitute all the values in a matrix

I have a matrix like the one shown below. It is a three coordinate system, and I would like to change the values 38,39 and 40 for the values 0,1,2. And after that represent the obtained matrix in a 3D plot.
38 38 0.09
39 38 0.19
40 38 0.12
38 39 0.05
39 39 0.09
40 39 0.34
38 40 0.45
39 40 0.11
40 40 0.23

 採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2018 年 8 月 20 日

1 投票

In this case:
M(:,1:2) = M(:,1:2)-38;
scatter3(M(:,1),M(:,2),M(:,3),M(:,3)*1000,M(:,3),'filled')
HTH

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by