필터 지우기
필터 지우기

How to use linprog when i have variable ('A')= cell

조회 수: 1 (최근 30일)
Alexandros Samp
Alexandros Samp 2016년 8월 26일
댓글: Alexandros Samp 2016년 8월 26일
Hello, I get the following error when i try to run the linprog command : error using linprog (line 144) LINPROG requires the following inputs to be of data type double: 'A'. All the other variables i have are double (f,b,Aeq,beq,lb) except from A which is a 35x1 cell.What can i do in order to convert A to type double.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 26일
  댓글 수: 7
Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 26일
How do you want to use it with linprog? explain your problem?
Alexandros Samp
Alexandros Samp 2016년 8월 26일
there are 35 nodes in a network and i have to find the optim solution for diameters.I find a range of different diameter for each pipe, each diameter represents a cost.I have an f vector with (1,112) differnt values of costs for pipes , A which is the cell with Headloss for each pipe in a network that is add up ,b is a vector (1,35) with the pressure that is needed in each node , Aeq is the length constraint for each pipe is a matrix (35,112) with zeros and 1, every pipe may be consisted of differnt diameter (example a pipe of 200 m may be x1+ x2+ x3 possible diameters),beq is the length of each pipe and lb is that each x should be greater than zero.

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by