Create a matrix with letters

I would like to know how to create the following matrix:
When there is a list of points with weights (xi, yi, zi are coordinates and mi are weights) I just don't know how to create it with those letters.

4 件のコメント

James Tursa
James Tursa 2018 年 4 月 6 日
Do you currently have variables with the m, x, y, z data in them?
Lee Cohen
Lee Cohen 2018 年 4 月 6 日
No, I don't have data in them.
James Tursa
James Tursa 2018 年 4 月 6 日
編集済み: James Tursa 2018 年 4 月 6 日
Are you trying to form a symbolic matrix? How is this going to be used downstream in your code?
Lee Cohen
Lee Cohen 2018 年 4 月 6 日
編集済み: James Tursa 2018 年 4 月 6 日
Yeah, I tried to write this code:
n = input('enter n\n');
syms m x y z
m x y z=ym('m x y z', [n 1]
I am trying to create this matrix using the information from
but I get error.

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

回答 (1 件)

James Tursa
James Tursa 2018 年 4 月 6 日

0 投票

Is this what you want:
A = [sym('m%d',[n 1]) sym('x%d',[n 1]) sym('y%d',[n 1]) sym('z%d',[n 1])]

1 件のコメント

Lee Cohen
Lee Cohen 2018 年 4 月 7 日
yes, thank you so much!

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

カテゴリ

タグ

質問済み:

2018 年 4 月 6 日

コメント済み:

2018 年 4 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by