Re: Multiplying by a random number



Abder-Rahman wrote:
In this MATLAB command:

tr = unit8(r.*double(not(t));

That would be uint8 instead of unit8

Provided that (r) is:

r = rand(256)*128+127;

What is the purpose of multiplying by (r)?

We don't know, we didn't write the code and you haven't given us
any context for what the routine is intended to do.

Likely the purpose hasn't changed since you last asked about this
block of code and I explained in detail exactly what it was doing
(but not why it was doing it.) (Others offered explanations as well,
but mine was the only one that expanded on the meaning of the
double(not(t)) if I recall correctly.)

--
Q = quotation(rand);
if isempty(Q); error('Quotation server filesystem problems')
else sprintf('%s',Q), end
.



Relevant Pages

  • Re: Physikalischen Druckbereich feststellen??
    ... Natürlich funktioniert die Routine, warum auch nicht? ... Berechnung fehlschlägt und ich den Context gar nicht mehr freigeben kann? ... der Aufrufer auch mitbekommt das eine Exception geworfen wurde. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: Day by Day (5-29)
    ... ordinance, perfectly legitimate weapon. ... detonation ordinance, terroritst weapon; ... With your apparent lack of understanding of context and purpose? ...
    (rec.arts.comics.strips)
  • Re: Darwinism causes people to stop loving each other
    ... Depends upon the context of the word you are using. ... don't have a science of purpose eventhough you do, ... Emotions: Some things honk you off more than others. ...
    (talk.origins)
  • [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390
    ... unregister themselves or their parent device. ... Two attribute methods are converted to use the new helper routine: ... * argument in the workqueue's process context. ... * since unregistration is mutually exclusive with driver callbacks. ...
    (Linux-Kernel)
  • Re: Physikalischen Druckbereich feststellen??
    ... Natürlich funktioniert die Routine, warum auch nicht? ... Berechnung fehlschlägt und ich den Context gar nicht mehr freigeben kann? ... der Aufrufer auch mitbekommt das eine Exception geworfen wurde. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)