How to increase a symbol in a row matrix?

1 回表示 (過去 30 日間)
RUPAL AGGRAWAL
RUPAL AGGRAWAL 2022 年 12 月 26 日
回答済み: KSSV 2022 年 12 月 26 日
I am trying to make a function in which by putting the value of n, the number of symbols in that row matrix comes to be n.
For example, Suppose I assign a function coeff(n) = [a1 a2 a3 a4 a5 ... an].
Now if i enter n = 3, coeff(3) = [a1 a2 a3].
I tried starting this way.
function[A] = coeff(n)
Henceforth i tried multiple codes but i failed. Please help. Thank you in advance.

採用された回答

KSSV
KSSV 2022 年 12 月 26 日
n = 4 ;
syms a [1 n] ;
a
a = 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by