Matlab letter "h" question

Can somebody explain me why is there "h" at the beginning of the numbers?
function w = hanning(n)
load('han.mat');
switch n
case 2220
w = h6000;
case 2960
w = h8000;
case 4079
w = h11025;
case 5920
w = h16000;
case 8159
w = h22050;
case 11840
w = h32000;
case 16317
w = h44100;
end

 채택된 답변

Oleg Komarov
Oleg Komarov 2011년 4월 7일

0 개 추천

The letter "h" is there because you cannot name a matlab variable with just digits.

추가 답변 (4개)

Walter Roberson
Walter Roberson 2011년 4월 6일

0 개 추천

Those are not numbers, those are variables that have been loaded from han.mat . I have no idea at the moment what is in the variables.
Rambo
Rambo 2011년 4월 7일

0 개 추천

http://cnx.org/content/m14233/latest/han.mat that's the file. I want to implement something similar in Java but I am not really sure what all this variables mean.
Rambo
Rambo 2011년 4월 7일

0 개 추천

that's clear but when I open han.mat file for each variable it has so many values. I have no idea what these values mean. It says it is a function for producing a hanning window. And how it is possible to store so many numbers in a one variable unless it is not a variable but array?

댓글 수: 1

Andrew Newell
Andrew Newell 2011년 4월 7일
@Rambo, when you respond to an answer you should do so by clicking on "Comment on this Answer".

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

Andrew Newell
Andrew Newell 2011년 4월 7일

0 개 추천

An array is just a variable with a lot of components. For example, you could type
h1 = 1:10;
and this creates a vector h1. This is a variable because you can change any component of it:
h1(1) = 0;
or add to it:
h1 = [h1 11];
I have arbitrarily added the number 1 to the name to show that it can be done.

카테고리

도움말 센터File Exchange에서 Performance and Memory에 대해 자세히 알아보기

제품

질문:

2011년 4월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by