photo

DH


Last seen: 1 year ago Active since 2024

Followers: 0   Following: 0

Statistics

All
Cody

0 Problems
9 Solutions

Discussions

1 Discussion

RANK
N/A
of 300,753

REPUTATION
N/A

CONTRIBUTIONS
0 Questions
0 Answers

ANSWER ACCEPTANCE
0.00%

VOTES RECEIVED
0

RANK
 of 21,075

REPUTATION
N/A

AVERAGE RATING
0.00

CONTRIBUTIONS
0 Files

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANK
41,362
of 170,858

CONTRIBUTIONS
0 Problems
9 Solutions

SCORE
104

NUMBER OF BADGES
1

CONTRIBUTIONS
0 Posts

CONTRIBUTIONS
0 Public Channels

AVERAGE RATING

CONTRIBUTIONS
1 Discussion

AVERAGE NO. OF LIKES
1

  • Solver

View badges

Feeds

View by

Discussion


Can someone tell me what's wrong with this code? This is a problem from Cody. For example, when n=3, the output should be the matrix [1 2 2 3 3 3]
function ans = your_fcn_name(n) n; j=sum(1:n); a=zeros(1,j); for i=1:n a(1,((sum(1:(i-1))+1)):(sum(1:(i-1))+i))=i.*ones...

1 year ago | 1