MATHWORKSのWebにあるwritematrixの例題でエラーが出ます
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MATLAB2020aを使用しています。
witematrixの使い方を知るために、
にある例題をコピー・ペーストして行ってみたのですが、下記のようにエラーが出ます。
何が良くないのでしょうか。ご教示いただけると助かります。
よろしくお願いいたします
>> M = magic(5)
M =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
>> writematrix(M)
入力引数が不足しています。
例題が正しいと下記のようになるようです
ここから-----------------------------
M = magic(5)
M = 5×5
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
writematrix(M)
type 'M.txt'
17,24,1,8,15
23,5,7,14,16
4,6,13,20,22
10,12,19,21,3
11,18,25,2,9
ここまで--------------------------------
0 commentaires
Réponses (1)
michio
le 31 Juil 2020
1つ考えられるのは別(自作?)の writematrix 関数が呼ばれている可能性ですが、念のため確認頂けますか?
which -all writematrix
と実行して一番上に
C:\Program Files\MATLAB\R2020a\toolbox\matlab\iofun\writematrix.m
が出てきているかどうかですが・・(MATLAB のインストール先によって冒頭は異なりますが toolbox 以下は一致するはずです。)
2 commentaires
Voir également
Catégories
En savoir plus sur データのインポートとエクスポート dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!