Demo script for Cell Tower Optimization Problem - Radius

조회 수: 2 (최근 30일)
Josh
Josh 2014년 11월 7일
댓글: Simran Sandhu 2019년 3월 15일
Hi,
I am working on the Demo script for Cell Tower Optimization Problem. I need to set a fixed radius rather than the random radius it outputs. In the file celltowersetup.m radius is defined as
R = rand(st, N,1)+1; % allocate array
but if I change it to
R = 1; % allocate array
just one tower appears rather than the 10 asked for. Where am I going wrong
Thanks
  댓글 수: 1
Simran Sandhu
Simran Sandhu 2019년 3월 15일
I am facing some error, I dont kow what am doing wrong while assigning the intial conditions.
Can you please mail me the code?
simrangsandhu@hotmail.com
Thank you

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2014년 11월 7일
I haven’t looked at the code for the demo, but it may be looking for the row size of ‘R’.
See if:
R = ones(N,1);
solves the problem.
  댓글 수: 1
Star Strider
Star Strider 2014년 11월 8일
I can’t tell from what you’ve provided. If you set ‘N’ to the number you want at the outset, and assigned ‘R’ as ‘ones(N,1)’ rather than ‘ones(10,1)’, everything should work, since I assume the code later refers to ‘N’ rather than to ‘length( R )’. (In the original code, ‘R’ is an (Nx1) vector of random numbers on (1,2).)
That’s my best guess.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by