Have a problem about code
조회 수: 4 (최근 30일)
이전 댓글 표시
I'm new in matlab and I have a problem below
Cs=[0.15:0.15:0.45];
Cx=0.12;
C0= 0.08;
Erf=(Cs-Cx)/(Cs-C0)
Why Erf answer have only 1 answer, it should have 9 answers?
댓글 수: 2
DGM
2021년 10월 3일
편집: DGM
2021년 10월 3일
Why would it have 9 elements? If you use elementwise division instead of matrix division, it'll have 3.
Cs = 0.15:0.15:0.45;
Cx = 0.12;
C0 = 0.08;
Erf = (Cs-Cx)./(Cs-C0)
If you transpose one of the vectors, you can get 9, but I don't know if that's intended.
Erf = (Cs-Cx)./(Cs.'-C0)
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!