Forgot password?
 Create new account
View 136|Reply 0

生成带行编号的符号矩阵

[Copy link]

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

青青子衿 Posted at 2023-4-9 10:20:57 |Read mode
Last edited by 青青子衿 at 2023-4-9 10:39:00
  1. lst1 = {"a", "b", "c"}; lst2 = {1, 4, 7, 15};
  2. f[X_, Y_] := ToExpression[Table[a <> ToString[b], {b, Y}, {a, X}]]
  3. f[lst1, lst2] // MatrixForm
  4. f1[Y_] :=
  5. ToExpression[Table[a <> ToString[b], {b, Y}, {a, {"a", "b", "c"}}]]
  6. f1[{1, 2, 3}] // MatrixForm
  7. Join[f[{"a", "b", "c", "d"}, {1, 2, 3}], {{a1, b1, c1, d1}}] //
  8.   Det // Factor
Copy the Code

手机版Mobile version|Leisure Math Forum

2025-4-20 22:28 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list