Community Profile

photo

Agam Sharma


Last seen: 11 days ago Active since 2022

Statistics

All
  • Introduction to MATLAB Master
  • First Answer
  • Community Group Solver
  • Solver
  • Commenter

View badges

Content Feed

View by

Answered
Help with Cody's 'Problem 672. Longest run of consecutive numbers', I wrote 'if a(i)==a(i+1)' and it says error
count=zeros(1,length(a)) for i=2:length(a) if(a(i)==a(i-1)) count(i)=count(i-1)+1 end end [m e]=max(count)...

2 months ago | 0

Answered
Check if element in array are square of each other
function b = isItSquared(a) b=false; c=a.^2; %creating another array containing respective squares in 'a' for i=1:l...

2 months ago | 0