MATLAB Onramp: 8.1 Obtaining help

20 Ansichten (letzte 30 Tage)
Jigyasu Chand am 4 Mai 2020
Beantwortet: Yillak Gedamu am 28 Mär. 2022
Hi folks!
I just started exploring MATLAB and I am stuck at the following place. In the course "MATLAB Onramp" which is one of the 'Getting Started' courses, I am not able to get the solution of '8. Obtaining help - Further Practice'. The task is to create a matrix that
• Contains random integers in the range from 1 to 20,
• Has 5 rows, and
• Has 7 columns.
matrix with normally distributed numbers (instead of uniformly distributed numbers).
-J
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Guillaume am 4 Mai 2020
I've just discovered that there are several versions of the Onramp course (R2018b, R2019a, and R2019b). The last two have slightly different presentation for the assignment (the first one doesn't seem to work properly) but in neither of them do I see that assignment under further practice. Which version are you using (look at the url)? Perhaps it is also language specific.
The assignment doesn't make sense and certainly won't be answered by the doc. You could rescale and recentre a normal distribution and possibly round it to integers but it still wouldn't be restricted to a range. And you could hardly call the result a normal distribution anymore.
You should report it as a bug to mathworks.
3 Kommentare1 älteren Kommentar anzeigen1 älteren Kommentar ausblenden
Guillaume am 4 Mai 2020
I should have read the further practice in more details. I didn't see that "Search the documentation to recreate the same matrix with normally distributed numbers (instead of uniformly distributed numbers)." It's new in the 2019b assignment.
I think it's poor wording, you're supposed to find a function that creates a normally distributed matrix with the same 5x7 dimensions. However, the integers in the range from 1 to 20 is not part of the new requirement.
Basically, they want you to find in the doc the function that creates normally distributed random numbers.
I'll raise a service request to get Mathworks to review the wording.
Jigyasu Chand am 8 Mai 2020
That seems fair. Thanks a lot!
-J

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (3)

Abubakr Eltayeb am 14 Aug. 2020
x = randn([5 7])
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Anand Gopal am 19 Jan. 2021
x = randi([1,20],5,7)
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Yillak Gedamu am 28 Mär. 2022
x = randi(20,5,7)
0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Logical finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by