Octave programming - some advice for newbie

AI Thread Summary
To generate random integers in Octave, users can utilize a command similar to Matlab's `randint`. While the exact command may differ, the goal is to create a matrix of random integers within a specified range. For example, in Matlab, the command `randint(4, 5, 100)` generates a 4x5 matrix of random integers between 0 and 100. Users seeking to implement this in Octave should look for an equivalent function that provides similar functionality for generating random integers.
Yukisan
Messages
1
Reaction score
0
Hi there - I am looking to get some help in programming with Octave. Trying to work out a random integer generator and well not really getting anywhere so far - I'm hoping someone can give an example or guide in terms of how I should go about doing it in Octave.

Thanks
 
Technology news on Phys.org
I've never used Octave but, given that it's attempting to be a clone of Matlab, I'd guess that it's got a randint command somewhere. For instance, to produce a 4x5 matrix of random integers over the range (0, 100) in Matlab you'd issue the command

Code:
>> randint(4, 5, 100)

ans = 

    12    27    15    80
    91    54    97    14
    63    95    95    42
     9    96    48    91

Presumably Octave has something similar.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Back
Top