This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
Range items in loops #22248
Unanswered
jdvalderra
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Are you using Juno? Also, can you show us the 2 deprecated calls? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all, I'm new to coding, and I'm trying to fill out a square matrix of appending sequences. I can easily make vectors of appending sequences but concatenating them all is inefficient and time consuming. I was able to make it before but my Julia-Atom crashed with the 2 deprecated calls, and I thought the projects were saved to my computer but when I reset Atom they were lost. If I try to fill an array row with a range of numbers, say 1:15 it will work if I have something like:
B = zeros(Int, 15, 15)
G = 1:15
B[1, :] = G
I get the first row as
1 2 3 4 5...ect
But if I try it in a loop
For g = 1:15
B[1, :] = g
End
I get the first row as
15 15 15 15....
Can someone explain why this is happening?
Any help is greatly appreciated, thanks.
Beta Was this translation helpful? Give feedback.
All reactions