Generating a matrix based on an equation with conditions
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
Are there any way to do the following?
I want to generate a n*1 matrix based on this equation:
M = T1*G*Z1 - T2*G*Z2 + F - C*P
all variables are known and constant but with the following conditions:
1) F is zero in the entire column, excpet at a certain row, its equal to a constant number
2) From Row 1 to a certain row, this term (T2*G*Z2) is zero, for example until row 200. While from row 201 to the end, the previous term has constant value but this term (T1*G*Z1) is zero.
Thanks
댓글 수: 6
Guillaume
2019년 3월 22일
If is most likely not needed.
What are the size of all the variables (T1, G, etc.)?
If they are not scalar variables did you mean * or .* for the multiplications?
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!