Create a function that generates random arrays of integers beween <I>a</I> and <I>b</I>,
inclusive. Use the definition line
function A = randhw(a,b,M,N)
where a and b define the (inclusive) range and M and N define the size
of the output array (rows and columns, respectively).
a. Test your function with the following piece of code:
x = randhw(10,17,100000,1);
hist(x,10:17)
The resulting histogram should be nearly flat from 10 to 17. Pay particular
attention to the endpoints of the distribution.
b. Test your function with the following pieces of code:
x = randhw(-30,5,100000,1);
hist(x,-30:5)
x = randhw(-45,-35,100000,1);
hist(x,-45:-35)
x = randhw(7,-2,100000,1);
hist(x,-2:7)
Consider that each of these uses is valid.
c. Modify your code to allow for missing/default inputs. Use the behavior of
rand to help design your code. You will need to use nargin in your
routine. For example, the function should be able to return
- a 5-by-5 array of integers between 1 and 20: e.g., A = randhw(1,20,5)
- a single random integer between 10 and 50: e.g., A = randhw(10,50)
- an empty array if not enough inputs are provided.
이 시팔 이거 솔직히 뭔 말인지도 잘 모르겠고 난 솔직히 못 짜겠다...벌써 제출일보다 3일 늦었는데 뭐 어떻게 할 수도 없고 좃같다 그냥
근데 나 학교 나름 괜찮은 곳 다니고 있음...막 건홍동 이딴 학교 다니면서 좋다고 씨부리는거 아님...
근데 니들 시팔 이것도 못 하면 니넨 걍 플갤에서 다 꺼져...
참고로 할 줄 아시는 분은 증거코드 첨부하여 주시면 감사하겠습니다..ㅠㅠ
inclusive. Use the definition line
function A = randhw(a,b,M,N)
where a and b define the (inclusive) range and M and N define the size
of the output array (rows and columns, respectively).
a. Test your function with the following piece of code:
x = randhw(10,17,100000,1);
hist(x,10:17)
The resulting histogram should be nearly flat from 10 to 17. Pay particular
attention to the endpoints of the distribution.
b. Test your function with the following pieces of code:
x = randhw(-30,5,100000,1);
hist(x,-30:5)
x = randhw(-45,-35,100000,1);
hist(x,-45:-35)
x = randhw(7,-2,100000,1);
hist(x,-2:7)
Consider that each of these uses is valid.
c. Modify your code to allow for missing/default inputs. Use the behavior of
rand to help design your code. You will need to use nargin in your
routine. For example, the function should be able to return
- a 5-by-5 array of integers between 1 and 20: e.g., A = randhw(1,20,5)
- a single random integer between 10 and 50: e.g., A = randhw(10,50)
- an empty array if not enough inputs are provided.
이 시팔 이거 솔직히 뭔 말인지도 잘 모르겠고 난 솔직히 못 짜겠다...벌써 제출일보다 3일 늦었는데 뭐 어떻게 할 수도 없고 좃같다 그냥
근데 나 학교 나름 괜찮은 곳 다니고 있음...막 건홍동 이딴 학교 다니면서 좋다고 씨부리는거 아님...
근데 니들 시팔 이것도 못 하면 니넨 걍 플갤에서 다 꺼져...
참고로 할 줄 아시는 분은 증거코드 첨부하여 주시면 감사하겠습니다..ㅠㅠ
내가 해주면, 너 지금 다니구 있는 학교에서 자퇴서 내고 꺼져줄꺼냐?
궁금한데 등록금 얼마야/
저런거 과제내주면 등록금 하나도 안아까우겠다. 우리 학교는 저런거 절대 안내주던데..왜냐하면 해오는 학생들이 손에 꼽히니
등록금 480만원인가?? 글고 저거 해주면 음...뭐가 필요한데?? 자퇴 말고...어차피 자퇴할거면 저거 해달란 말도 안 했을거 아냐