MATLAB Answers

How to make variable matrix?

24 views (last 30 days)
WonJong We
WonJong We on 14 Apr 2021 at 21:20
Commented: WonJong We on 14 Apr 2021 at 21:56
how to make this matrix?
B=(T(0):T(n))
A=B(:)
its error

Accepted Answer

Chad Greene
Chad Greene on 14 Apr 2021 at 21:51
In Matlab, the first index of any variable is 1, so T(0) will produce an error. Try T(1) to T(n+1).
  1 Comment
WonJong We
WonJong We on 14 Apr 2021 at 21:56
Thank you so much!!
but still error...
Should I enter the equation for T?
I want to calculate with T as a variable.
syms T
B=(T(1):T(n+1))
A=B(:)

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!