I have a datasheet of 34*300000 and a 1D array of 300. Inside the array I got random numbers between 1 and 300k and I want to allocate the value of 1 into xth column of 34th row of the datasheet, a fairly simple task. I tried the below code but it take 10+ minutes to run (on 8gb RAM, corei7 6500 cpu):
For i = 1:300
Datasheet(34,array(i)) = 1
End
Any suggestions on what is going wrong?

 ์ฑ„ํƒ๋œ ๋‹ต๋ณ€

Abbas Nasri
Abbas Nasri 2020๋…„ 7์›” 12์ผ

0 ๊ฐœ ์ถ”์ฒœ

I figured it out, a semicolon at the end of the second line did the job ๐Ÿคฆ๐Ÿปโ™‚

๋Œ“๊ธ€ ์ˆ˜: 1

madhan ravi
madhan ravi 2020๋…„ 7์›” 12์ผ
Things happen xD

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

๋„์›€๋ง ์„ผํ„ฐ ๋ฐ File Exchange์—์„œ Introduction to Installation and Licensing์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

์ œํ’ˆ

ํƒœ๊ทธ

์งˆ๋ฌธ:

2020๋…„ 7์›” 12์ผ

๋Œ“๊ธ€:

2020๋…„ 7์›” 12์ผ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by