필터 지우기
필터 지우기

a small problem with linspace

조회 수: 1 (최근 30일)
sofiane benhamza
sofiane benhamza 2020년 9월 25일
댓글: sofiane benhamza 2020년 9월 25일
a =
11981420 % length of an audio which i need
>> g=linspace(1,200,5); % what we all know about linspace command
>> length(g)==5
ans =
1
>> s=linspace(1,0,a/40); % s should have a/40 element
>> length(s)==a/40
ans =
0 % but , why false??! ,

채택된 답변

Adam Danz
Adam Danz 2020년 9월 25일
편집: Adam Danz 2020년 9월 25일
11981420 is not divisible by 40.
11981420/40
ans =
2.9954e+05 % = 299535.5
size(s)
ans =
1 299535
299535 == 299535.5
ans =
logical
0
  댓글 수: 1
sofiane benhamza
sofiane benhamza 2020년 9월 25일
i didn't realise that , thank you :- )

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by