Cody

Piero Cimule

1984
Rank
5
Badges
810
Score
51 – 100 of 106

Piero Cimule submitted a Comment to Solution 2586400

r = randi(6,[1,2]) x1 = r(1); x2 = r(2);

on 20 Jun 2020

Piero Cimule submitted a Comment to Solution 2586394

y=0; for index=1:length(x) y = y + str2num(x(index)); end

on 20 Jun 2020

Piero Cimule submitted a Comment to Solution 2586385

y = [x(1),x(end)];

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586337

K = kron(1:n,1:n) m = reshape(K,n,n)

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586271

L=length(x); if L==1 tf=true; % adding a condition for single element return %we must close the case for faster operation end for ii = 1:(L-1) if x(ii+1) > x(ii) tf= true ; else tf=false ; break end end end

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586241

if true(find(b == a)) y = 1 else y = 0 end

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586205

B=A B(:,end) = A(:,1); B(:,1) = A(:,end);

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586190

x = A(:,1); y = A(:,end); A(:,1)=y; A(:,end)=x; B=A

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586181

[r, q] = deal(a,b)

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586118

A(:,n)=[]; B=A

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2586085

y = x(1:2:length(x))

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2585890

ans=0 for i=1:n for j=1:i ans(end+1)=i; end end ans(:,1)=[] %delete first column

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2585557

b=false; for i=1:length(a) value = a(i)^2 if true(find(a==value)) b=true; end end

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2585335

find(vertcat(1,diff(a(:)),1)); val=a(ans(diff(ans)==max(diff(ans))))

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2585002

A= 60:0.1:100; A_reescale= rescale(A,0,4); for c=1:size(X,1); for d=1:size(A,2); if X(c,(size(X,2)))==A(d); X(c,(size(X,2)))=A_reescale(d); end end end

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2581468

if size(x,2)==size(y,1) z=x*y else z = "The inner dimensions are 3 and 2. Matrix multiplication is not possible" end

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2581435

load cars.mat sorted = sortrows (cars,4) n = N mpg = sorted(1:n,2) mpg=mpg{:,:}

on 19 Jun 2020

Piero Cimule submitted a Comment to Solution 2197935

function m = plot_cos(y, t) [m,idx]=min(y); t_m=t(idx); plot(t,y,'b--',t_m,m,'r*') end :-D

on 18 Jun 2020

Piero Cimule received Commenter badge for Solution 2197935

on 18 Jun 2020

51 – 100 of 106