List “short syntax” creates something … different

Luke Janicke shared this question 1 week ago
Answered

I want to plot two lists.

e.g.

A = {0, 1, 2, 3, 4, 5}

B = {3, 4, 5, 6, 7, 8}

It works if the lists are defined explicitly (as above).

Plot1 = (A, B)

However, if a list is defined using the “short syntax” …

C = {3...8}

The result displays like this …

C = ( 3 4 5 6 7 8 )

What’s with the round brackets and no commas?

When I try to plot using this “list” …

Plot2 = (A, C)

… it plots the points on a vertical line, using the first element of A for all the points.

Comments (3)

photo
2

hi


C = {3...8} is "wrong" C = 3...8 is correct

photo
1

That does the trick. I think I was using GeoGebra classic syntax from the wiki.

photo
1

I think I was using GeoGebra classic syntax from the wiki.
???


https://wiki.geogebra.org/en/Lists

The short syntax .. creates a list of successive integers: e.g. -5..5 creates the list {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5}.

photo
© 2018 International GeoGebra Institute