Scalar Multiplication of different values at same time
Mostra commenti meno recenti
I have a function -
[x1 x2 x3] = somefunction(y1,y2);
now i want to multiply the [x1 x2 x3] by scalar value z.
[x1 x2 x3] = [x1 x2 x3] .*z; % Want to do like this which is not valid as per the codde
instead of doing the multiplication individually i want to do the multiplication all at a time.
Is there any way to mulitiplication all at a time.
Risposte (1)
madhan ravi
il 26 Giu 2019
Modificato: madhan ravi
il 26 Giu 2019
0 voti
Assign the values with one output for instance as variable X which consists all the values in it.
6 Commenti
Kanchibhotla Chandra Sekhar
il 26 Giu 2019
Modificato: Kanchibhotla Chandra Sekhar
il 26 Giu 2019
madhan ravi
il 26 Giu 2019
" i know you want to vector these ... "
What does that even mean??
Kanchibhotla Chandra Sekhar
il 26 Giu 2019
madhan ravi
il 26 Giu 2019
Modificato: madhan ravi
il 26 Giu 2019
Illustrate what your trying to do with an expected output (meaning
a = 10;
b = 20;
result = a * b
% which would give 200
), that's what a valid illustration is unlike yours? , have a hard time understanding what’s your goal. Nobody here can read what's in your mind.
Kanchibhotla Chandra Sekhar
il 26 Giu 2019
per isakson
il 27 Giu 2019
Modificato: per isakson
il 27 Giu 2019
AFAIK: NO! However, some do weird tricks with subsref and subsasgn.
Categorie
Scopri di più su MATLAB Compiler in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!