Reshape an array in MATLAB
€8-12 EUR
着払い
Dear Freelancer,
i have a reshape task for Matlab. I know how to use reshape but I am stuck with this one:
I have matrix a = reshape(1:81, 9,9);
a =
1 10 19 28 37 46 55 64 73
2 11 20 29 38 47 56 65 74
3 12 21 30 39 48 57 66 75
4 13 22 31 40 49 58 67 76
5 14 23 32 41 50 59 68 77
6 15 24 33 42 51 60 69 78
7 16 25 34 43 52 61 70 79
8 17 26 35 44 53 62 71 80
9 18 27 36 45 54 63 72 81
My goal is to transform "a" into "a_reshape"(which is a 3x3x3x3 matrix). The first a(1:3,1:3) elements of "a" should form the following block in the new matrix a_reshape(:,:,1,1)
ans =
1 10 19
2 11 20
3 12 21
The next elements of a(1:3, 3:6) shall be a_reshaped(:,:,1,2)
ans =
28 37 46
29 38 47
30 39 48
a(1:3, 6:9) shall be a_reshaped(:,:,1,3)
a(3:6, 1:3) shall be a_reshaped(:,:,2,1)
ans =
4 13 22
5 14 23
6 15 24
and so on until the end when a(7:9,7:9) is mapped to a_reshaped(:,:,3,3)
I want to be able to generalize the code easily to other cases like when "a" is a 8x8 matrix and "a_reshahpe" is 2x2x2x2x2x2 or a 4x4x4x4 matrix
I think the project is quiet easy and you should be able to do it in a day or maybe even few hours. I m looking forward to work with you and thank you for your help :)
Loius
プロジェクトID: #16230010
プロジェクトについて
アワード:
my bid ................................................................................................................................................................................
9人のフリーランサーが、平均€18 で、この仕事に入札しています。
Hi There I have checked your project description and understand everything. I am very confident that i can do this project perfectly. Thanks
Hi i am an engineer i would like to work with you on this project. For further details please inbox. Thank you
Hey there, Hope you are doing great. You may go with us to avail our best services. See you https://www.freelancer.com/projects/programming/Mathcad-work-very-urgent/
Hi, I am an expert in matlab reshape matrix, many projects. I did already many projects in matlab, math, mechanics, physiscs. and so on. Please contact.
HI Sir , i can do this this is very simple to do i can do this in few hours , please tex me oncei will taketo you once sir and also i am preety sure that you will award me the the project Thank you NiThIsH
I am an electrical engineer having good knowledge in Matlab. I will deliver you this project within 5 hours.