필터 지우기
필터 지우기

Help on Basic Matrices

조회 수: 1 (최근 30일)
tzenh karetzh
tzenh karetzh 2014년 1월 6일
댓글: Youssef Khmou 2014년 1월 6일
Hi, I'm new to Matlab and I know its Help Guide is big and accurate. However I couldn't find the answer to my question,probably because it's pretty straightforward. I want to create the following matrix:
a = [8 -180 65789 2098; 0.15 202.9 -0.64 -100.19]
But then it just shows :
a =
1.0e+04 *
0.0008 -0.0180 6.5789 0.2098
0.0000 0.0203 -0.0001 -0.0100
I'd like to know what the unwanted text is ''1.0e+04'' and also know why the matrix has such different numbers. How do i fix this and what is the source of this problem? Then i try using the following functions: 1. int8(a) 2. int16(a) 3. uint8(a) Could you explain their use,please?

채택된 답변

Youssef  Khmou
Youssef Khmou 2014년 1월 6일
the representation is only related to the type of formatting the answer, try :
>>format bank
>>a
type doc format for more options, to reset to the default format, type :
>>format
  댓글 수: 4
tzenh karetzh
tzenh karetzh 2014년 1월 6일
and could you tell me why the functions int8 uint8 and int16 are rounding the decimal number for example :
int16(202.9) = 203 and
int8(-0.64) = -1 ?
Youssef  Khmou
Youssef Khmou 2014년 1월 6일
numbers with digits after the decimal points are stored as double , intX converts the numbers to the range [-(2^(X)/2 : 2^(X)/2]

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by