I can't get my function to work or print right
조회 수: 1 (최근 30일)
이전 댓글 표시
x=(0:31);
y=(2.^x);
disp(y)
Im just trying to get a list of values from 2^0 to 2^31. I know the range is right but I guess theres something I don't understand about functions because the values are mostly below 1.
댓글 수: 0
채택된 답변
Walter Roberson
2023년 11월 8일
The values are not below 1: you have been fooled by the way the default output format
x=(0:31);
y=(2.^x);
disp(y)
format long g
disp(y)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!