我想求两个向量(矩阵)的差的范数的平方 怎么写程序啊 新手求帮助:handshake
g=范数符号X-Xd范数符号 平方 不会打符号见谅

 採用された回答

hitivi
hitivi 2022 年 11 月 18 日

0 投票

程序如下:
n = 10;
X = rand(1,n);
Xd = rand(1,n);
% 计算2-范数平方
g = norm(X-Xd,2)^2;

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2022 年 11 月 18 日

回答済み:

2022 年 11 月 18 日

Community Treasure Hunt

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

Start Hunting!