lundi 4 février 2019

Calling data with using rand command

I want to call data in the matrix by using a string which is defined by 'rand' command.

   A=[1 2]
   B=[2 3]
   C=[3 5]

   corners = 'ABC'
   randompick = corners(randi(numel(corners)))
   disp(randompick)
   randompick(1) 

I want as an example for A matrix:

   1

What's wrong in this script? Thanks.




Aucun commentaire:

Enregistrer un commentaire