Community Profile

photo

Agam Sharma


Last seen: 6 months ago Active since 2022

Followers: 0   Following: 0

Statistics

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

View badges

Feeds

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 years 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 years ago | 0