photo

Bashir Yusuf Bichi


Actif depuis 2017

Followers: 0   Following: 0

Statistiques

  • Thankful Level 3

Afficher les badges

Feeds

Afficher par

Question


How to generate a random number that is greater than or equals to a given number
example a=5 y=randi(number)>=a

plus de 6 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Extracting the first three minimum elements from a vector v and assign them to h then letter remove the elements from vector v and used the index to removed some element in vector w.
v(h)=[]; w(h)=[]; thanks @KSSV, I got it. I don't have to use the while loop.

presque 7 ans il y a | 0

| A accepté

Question


Extracting the first three minimum elements from a vector v and assign them to h then letter remove the elements from vector v and used the index to removed some element in vector w.
v=[3,6,1,7,9,4]; w=[3,2,7,1,9,5]; [x,y]=sort(v); h=x(1:3); i=1; while i<=numel(v) if v(i)==h(i) % here h wil...

presque 7 ans il y a | 2 réponses | 0

2

réponses

Question


How to pass a variable from one function to another without declaring it as global
Fn1 { a; b; } Fn2 { c=a; }

presque 7 ans il y a | 1 réponse | 0

1

réponse

Question


if I have a vector of 20 elements, how can I extract the 5 minimum elements in that vector
V=[23,56,12,90,45,21,56,10,70,100,15,...] a=[10,12,15,21,23]

presque 7 ans il y a | 2 réponses | 0

2

réponses

Question


how to combine two different vectors into a cell array
e.g v=[3,6,4...] b=[5,3,1,...] C=cell array containing v and b

presque 7 ans il y a | 1 réponse | 0

1

réponse

Question


How to create an array with pair of elements, how can i also use first pair in computation
such as H=[1,4,2] V=[(4,3),(5,1),(7,5)] b=[(4+1),(5+4),(7+2)] c=second pair of V i.e. c=[3,1,7]

presque 7 ans il y a | 1 réponse | 0

0

réponse

Question


Matlab functions/scripts
I have four Matlab functions/scripts and I call all the functions/scripts from one main function, but the results where differen...

environ 7 ans il y a | 1 réponse | 0

1

réponse

Question


How can I extract all values in a row of an array without the its maximum value
ex a= 1 3 6 5 6 7 1 9 5 3 9 10 the extracted row will be 5 3 9

environ 7 ans il y a | 2 réponses | 0

2

réponses

Question


Am trying to reduce a vector by summing some elements in the vector to form another vecter
example if v=[40,34,10,8,6,2] then the new vector will make 40 to be the reference point. after comparing each element the new ...

environ 7 ans il y a | 1 réponse | 0

1

réponse

Question


How can I find the maximum of a given matrix and then locate the minimum value along the row of the maximum value
e.g a = 4 2 8 5 9 1 3 10 17 maximum will be 17 for the entire array and 3 will be the min value ...

environ 7 ans il y a | 3 réponses | 0

3

réponses

Question


how to find min or max value in each row of a matrix and its index, if a matrix is 3x2 it will find the min in first row
R= [27 25 21; 35 38 37; 42 47 49]; 1st min value will be 21

environ 7 ans il y a | 2 réponses | 1

2

réponses

Question


how can I add a value to a particular cell in an array.
if [3,2,4,5;3,2,6,4;2,5,8,5] is array then we add we add 2 to the second row to become [2,3,2,5;3, *4*,6,4;2,5,8,5]

environ 7 ans il y a | 1 réponse | 0

1

réponse

Question


How to obtain a set of matrix from another matrix by adding the previous row value along the column to the next row on the same column
Example a= 2,4;3,4;2 1 the new matrix will be b= 2,4;3+2,4+4;2+3+2,1+4+4 along the colums

environ 7 ans il y a | 1 réponse | 0

1

réponse

Question


how can I find the maximum value in each row of a matrix and sum along the column then assign the values to another matrix
example 2 3 3 4 5 3 1 2 3 2.5 the answer will be a vector (5+3, 3+4+2) the code may be incorrect but, I onl...

environ 7 ans il y a | 1 réponse | 0

1

réponse