Frage


How to sort vector alternatively
I have a vector a=[1 3;3 4;3 6;4 8]; I want to alternatively sort matrix ‘a’ row wise (second column), i.e Highest element in...

mehr als 7 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to get the vector rankings as per values without common rankings
I have a problem of x=[1 3 4 2 3] ... I want its answer should be a=[1 3 5 2 4]and not in form of a=[1 3 4 2 3]... These are...

mehr als 7 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


How to check the sort order of a vector
It is not working b=[5 6;3 4;1 2] [r,c]=size(b); a=b(:,c); if for i=1:r-1, a(i)>=a(i+1), end disp 'OK', else d...

mehr als 7 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


How to save matrix created in each iteration
n=1; while n<4 k=[1 2 3 4;5 6 7 8]; k=k*n; n=n+1; display(n) display(k) end

mehr als 7 Jahre vor | 1 Antwort | 0

1

Antwort