I keep getting an error?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to take data that is stored in a cell and divide it but another variable but I keep getting and operator './' is not supported for operand of type 'cell'. I dont know how to fix this issue but for reffrence here is what i have writen so far. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1176373/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1176373/image.png)
답변 (2개)
James Tursa
2022년 11월 1일
Generally, these types of problems are solved by extracting the contents of the cell instead of using the cell itself. E.g.,
C = {10,20,30}
C{3} ./ C{1} % use curly braces to extract the content of the cell
C(3) ./ C(1) % this tries to divide the cell itself and generates an error
댓글 수: 0
Star Strider
2022년 11월 1일
It may be necessary to use the cell2mat function if the arrays are in a cell array. The existing cell array elements must be purely numeric of the same class, and must have consistent dimensions that allows for them to be concatenated.
Once they are in a matrix, you can work with them as array elements.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!