WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

The sum of rand numbers

 

convexity
Forum-Newbie

Forum-Newbie


Beiträge: 2
Anmeldedatum: 10.10.17
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 26.10.2017, 21:55     Titel: The sum of rand numbers
  Antworten mit Zitat      
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:)
Private Nachricht senden Benutzer-Profile anzeigen


convexity
Themenstarter

Forum-Newbie

Forum-Newbie


Beiträge: 2
Anmeldedatum: 10.10.17
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 26.10.2017, 22:47     Titel:
  Antworten mit Zitat      
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:(
Private Nachricht senden Benutzer-Profile anzeigen
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

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 | goMatlab RSS Button 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.