m=1:24*(T^-1);
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Usman Mussadiq
am 11 Sep. 2021
Kommentiert: Stephen23
am 14 Sep. 2021
Please explain theequation what is it mean and why it is used in programming
m=1:24*(T^-1);
2 Kommentare
Akzeptierte Antwort
Chunru
am 11 Sep. 2021
T = 2 % Given a number T
T^-1 % T^-1 is 1/T
m=1:24*(T^-1) % m is from 1 to 24/T=12 with default step of 1
0 Kommentare
Weitere Antworten (1)
Walter Roberson
am 11 Sep. 2021
In context, is T a scalar floating point value that is expected to be less than 1 ?
If so, then the code would be equivalent to
m = 1 : 24./T;
which would be equivalent to
m = 1 : floor(24./T);
which would be the list of integers, 1, 2, 3, 4, ... up to floor(24./T)
The reason for the code is not clear. In most cases in which something that looks like this might be used, the variable T would instead be named Fs or FS or fs (frequency of sampling) or else f (frequency). T tends to suggest a time, and it would be uncommon to want to do something until the inverse of a time.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays 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!