Asymptote: How to use nested arrays?
How would I create a nested array in Asymptote such as [[1,2,3],[4,5,6]] and call upon element 1 of array 1 and such?
asymptote
add a comment |
How would I create a nested array in Asymptote such as [[1,2,3],[4,5,6]] and call upon element 1 of array 1 and such?
asymptote
1
Does the discussion in section 2.15 of this nice tutorial help?
– marmot
Feb 9 at 20:13
Kind of, but I still don't fully understand the syntax. How would you define such an array such as my example [[1,2,3],[4,5,6]] above?
– James Palmer
Feb 9 at 20:40
2
Generally you are much more likely to get a concrete answer if you post a concrete question. In your case this would be an asymptote code that attempts to use an array. Then the one who is willing to write an answer will know whether you are talking about integers or reals and so on, and in particular does not have to type so much themselves.
– marmot
Feb 9 at 21:51
4
Note to close/reopen-voters: Asymptote (like Metapost) is part of the TeX ecosystem even though its syntax does not resemble standard TeX syntax. See tex.meta.stackexchange.com/questions/3518/…. Also note that the Asymptote tag has 7 questions on Stackoverflow versus 403 on TeX.SX.
– Charles Staats
Feb 10 at 1:39
add a comment |
How would I create a nested array in Asymptote such as [[1,2,3],[4,5,6]] and call upon element 1 of array 1 and such?
asymptote
How would I create a nested array in Asymptote such as [[1,2,3],[4,5,6]] and call upon element 1 of array 1 and such?
asymptote
asymptote
asked Feb 9 at 19:33
James PalmerJames Palmer
134
134
1
Does the discussion in section 2.15 of this nice tutorial help?
– marmot
Feb 9 at 20:13
Kind of, but I still don't fully understand the syntax. How would you define such an array such as my example [[1,2,3],[4,5,6]] above?
– James Palmer
Feb 9 at 20:40
2
Generally you are much more likely to get a concrete answer if you post a concrete question. In your case this would be an asymptote code that attempts to use an array. Then the one who is willing to write an answer will know whether you are talking about integers or reals and so on, and in particular does not have to type so much themselves.
– marmot
Feb 9 at 21:51
4
Note to close/reopen-voters: Asymptote (like Metapost) is part of the TeX ecosystem even though its syntax does not resemble standard TeX syntax. See tex.meta.stackexchange.com/questions/3518/…. Also note that the Asymptote tag has 7 questions on Stackoverflow versus 403 on TeX.SX.
– Charles Staats
Feb 10 at 1:39
add a comment |
1
Does the discussion in section 2.15 of this nice tutorial help?
– marmot
Feb 9 at 20:13
Kind of, but I still don't fully understand the syntax. How would you define such an array such as my example [[1,2,3],[4,5,6]] above?
– James Palmer
Feb 9 at 20:40
2
Generally you are much more likely to get a concrete answer if you post a concrete question. In your case this would be an asymptote code that attempts to use an array. Then the one who is willing to write an answer will know whether you are talking about integers or reals and so on, and in particular does not have to type so much themselves.
– marmot
Feb 9 at 21:51
4
Note to close/reopen-voters: Asymptote (like Metapost) is part of the TeX ecosystem even though its syntax does not resemble standard TeX syntax. See tex.meta.stackexchange.com/questions/3518/…. Also note that the Asymptote tag has 7 questions on Stackoverflow versus 403 on TeX.SX.
– Charles Staats
Feb 10 at 1:39
1
1
Does the discussion in section 2.15 of this nice tutorial help?
– marmot
Feb 9 at 20:13
Does the discussion in section 2.15 of this nice tutorial help?
– marmot
Feb 9 at 20:13
Kind of, but I still don't fully understand the syntax. How would you define such an array such as my example [[1,2,3],[4,5,6]] above?
– James Palmer
Feb 9 at 20:40
Kind of, but I still don't fully understand the syntax. How would you define such an array such as my example [[1,2,3],[4,5,6]] above?
– James Palmer
Feb 9 at 20:40
2
2
Generally you are much more likely to get a concrete answer if you post a concrete question. In your case this would be an asymptote code that attempts to use an array. Then the one who is willing to write an answer will know whether you are talking about integers or reals and so on, and in particular does not have to type so much themselves.
– marmot
Feb 9 at 21:51
Generally you are much more likely to get a concrete answer if you post a concrete question. In your case this would be an asymptote code that attempts to use an array. Then the one who is willing to write an answer will know whether you are talking about integers or reals and so on, and in particular does not have to type so much themselves.
– marmot
Feb 9 at 21:51
4
4
Note to close/reopen-voters: Asymptote (like Metapost) is part of the TeX ecosystem even though its syntax does not resemble standard TeX syntax. See tex.meta.stackexchange.com/questions/3518/…. Also note that the Asymptote tag has 7 questions on Stackoverflow versus 403 on TeX.SX.
– Charles Staats
Feb 10 at 1:39
Note to close/reopen-voters: Asymptote (like Metapost) is part of the TeX ecosystem even though its syntax does not resemble standard TeX syntax. See tex.meta.stackexchange.com/questions/3518/…. Also note that the Asymptote tag has 7 questions on Stackoverflow versus 403 on TeX.SX.
– Charles Staats
Feb 10 at 1:39
add a comment |
1 Answer
1
active
oldest
votes
Illustration in interactive mode:
$ asy
Welcome to Asymptote version 2.41 (to view the manual, type help)
> int a = {{1,2,3},{4,5,6}};
> a // please print a
1 2 3
4 5 6
> a[1][1] // index-1 entry of index-1 array in a
5
> a[1] // index-1 array in a
0: 4
1: 5
2: 6
2
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474100%2fasymptote-how-to-use-nested-arrays%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Illustration in interactive mode:
$ asy
Welcome to Asymptote version 2.41 (to view the manual, type help)
> int a = {{1,2,3},{4,5,6}};
> a // please print a
1 2 3
4 5 6
> a[1][1] // index-1 entry of index-1 array in a
5
> a[1] // index-1 array in a
0: 4
1: 5
2: 6
2
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
add a comment |
Illustration in interactive mode:
$ asy
Welcome to Asymptote version 2.41 (to view the manual, type help)
> int a = {{1,2,3},{4,5,6}};
> a // please print a
1 2 3
4 5 6
> a[1][1] // index-1 entry of index-1 array in a
5
> a[1] // index-1 array in a
0: 4
1: 5
2: 6
2
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
add a comment |
Illustration in interactive mode:
$ asy
Welcome to Asymptote version 2.41 (to view the manual, type help)
> int a = {{1,2,3},{4,5,6}};
> a // please print a
1 2 3
4 5 6
> a[1][1] // index-1 entry of index-1 array in a
5
> a[1] // index-1 array in a
0: 4
1: 5
2: 6
Illustration in interactive mode:
$ asy
Welcome to Asymptote version 2.41 (to view the manual, type help)
> int a = {{1,2,3},{4,5,6}};
> a // please print a
1 2 3
4 5 6
> a[1][1] // index-1 entry of index-1 array in a
5
> a[1] // index-1 array in a
0: 4
1: 5
2: 6
answered Feb 9 at 22:45
Charles StaatsCharles Staats
13.3k552114
13.3k552114
2
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
add a comment |
2
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
2
2
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
Nice to see you back! And I fully agree with your above comment.
– marmot
Feb 10 at 3:09
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474100%2fasymptote-how-to-use-nested-arrays%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Does the discussion in section 2.15 of this nice tutorial help?
– marmot
Feb 9 at 20:13
Kind of, but I still don't fully understand the syntax. How would you define such an array such as my example [[1,2,3],[4,5,6]] above?
– James Palmer
Feb 9 at 20:40
2
Generally you are much more likely to get a concrete answer if you post a concrete question. In your case this would be an asymptote code that attempts to use an array. Then the one who is willing to write an answer will know whether you are talking about integers or reals and so on, and in particular does not have to type so much themselves.
– marmot
Feb 9 at 21:51
4
Note to close/reopen-voters: Asymptote (like Metapost) is part of the TeX ecosystem even though its syntax does not resemble standard TeX syntax. See tex.meta.stackexchange.com/questions/3518/…. Also note that the Asymptote tag has 7 questions on Stackoverflow versus 403 on TeX.SX.
– Charles Staats
Feb 10 at 1:39