|
convexity |
Forum-Newbie
|
|
Beiträge: 2
|
|
|
|
Anmeldedatum: 10.10.17
|
|
|
|
Wohnort: ---
|
|
|
|
Version: ---
|
|
|
|
|
|
Verfasst am: 26.10.2017, 21:55
Titel: The sum of rand numbers
|
|
Hey guys,
i have the following question: how can i write a code, that calculate the sum of the elements of the row vector y without using the sum function or for loop.
For example: y=rand(1,randi(15)). I would really appreciate it, because i have an internship and i am currently working with Matlab and my supervisor gave me this question. I am not an Expert...
btw, it should work with any dimension.
Thank you:)
|
|
|
|
|
convexity |
Themenstarter
Forum-Newbie
|
|
Beiträge: 2
|
|
|
|
Anmeldedatum: 10.10.17
|
|
|
|
Wohnort: ---
|
|
|
|
Version: ---
|
|
|
|
|
|
Verfasst am: 26.10.2017, 22:47
Titel:
|
|
I want to add this: It should work with the scalar product and the length of x as random numbers should be the same length as the vector with 1111...
But i don't know how to code this:(
|
|
|
|
|
Einstellungen und Berechtigungen
|
|
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
|
|
Impressum
| Nutzungsbedingungen
| Datenschutz
| FAQ
| RSS
Hosted by:
Copyright © 2007 - 2024
goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.
|
|