ly = [-10 70 ] in matlab

Assuming you want to store the values -10 and 70 in a variable ly, you can define ly as a row vector using square brackets [] as follows:

main.m
ly = [-10 70];
15 chars
2 lines

If you want to define ly as a column vector instead, use a semicolon ; to separate the values:

main.m
ly = [-10; 70];
16 chars
2 lines

You can then access the values stored in ly using indexing. For example, ly(1) returns -10 and ly(2) returns 70.

related categories

gistlibby LogSnag