-
1 Comment
Lesandu Wenitha Sugathadasa
on 13 Oct 2020
What is wrong with this code please help me!
function c=back_and_forth(n)
y=n.^2;%expand the number x to x.^2 value because there must be x by x matrix
g=1:y;%expand the value 1 to y
f=reshape(g,n,n);%reshape g into x by x matrix
c=f';
end
Suggested Problems
-
Remove all the words that end with "ain"
2472 Solvers
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
551 Solvers
-
1180 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
384 Solvers
-
Deleting an element in a matrix
475 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!