Create a matrix with letters

74 Ansichten (letzte 30 Tage)
Lee Cohen
Lee Cohen am 6 Apr. 2018
Kommentiert: Lee Cohen am 7 Apr. 2018
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 Kommentare
Lee Cohen
Lee Cohen am 6 Apr. 2018
Bearbeitet: James Tursa am 6 Apr. 2018
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

James Tursa
James Tursa am 6 Apr. 2018
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 Kommentar
Lee Cohen
Lee Cohen am 7 Apr. 2018
yes, thank you so much!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by