![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1145550/image.png)
MATLAB is not displaying my numbers as what they should be.
조회 수: 14 (최근 30일)
이전 댓글 표시
I am going through the introduction to engineering course on the MATLAB website.
It asks me to plot a stress vs strain graph. I created a variable called data using
data = zeros(10,4)
because I had 10 applied force values and then the 4 columns for further calculations. So created this data variable matrix and entered my values, then I needed to use it to plot. When I open the data variable by clicking on it in the workspace, it shows the correct values, but when I enter data in the command window, it does not show the correct values.
Please help.
when I enter data in command window
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1145435/image.png)
when I click data in workspace
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1145440/image.png)
댓글 수: 1
Stephen23
2022년 10월 4일
편집: Stephen23
2022년 10월 4일
"When I open the data variable by clicking on it in the workspace, it shows the correct values, but when I enter data in the command window, it does not show the correct values."
They look the same to me, just different representations of exactly the same numbers.
Perhaps you are not taking into account the common multiplier at the top:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1145550/image.png)
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Stress and Strain에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!