Reshape an array in MATLAB

完了済み 投稿 6年前 着払い
完了済み 着払い

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

アルゴリズム 電気工学 エンジニアリング 数学 Matlab and Mathematica

プロジェクトID: #16230010

プロジェクトについて

9個の提案 リモートプロジェクト アクティブ 6年前

アワード:

AhmedSobhiSaleh

my bid ................................................................................................................................................................................

€20 EUR 2日以内
(32レビュー)
5.0

9人のフリーランサーが、平均€18 で、この仕事に入札しています。

binyameen441

Hi There I have checked your project description and understand everything. I am very confident that i can do this project perfectly. Thanks

€14 EUR 10日以内
(34件のレビュー)
4.8
iridescent2x15

Hi i am an engineer i would like to work with you on this project. For further details please inbox. Thank you

€30 EUR 10日以内
(11件のレビュー)
4.4
khurram4225

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/

€12 EUR 0日以内
(14件のレビュー)
4.6
jackjonson1990

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.

€29 EUR 10日以内
(5件のレビュー)
2.4
nithiswarareddy

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

€14 EUR 10日以内
(レビュー1件)
0.6
nareshkumar94

I am an electrical engineer having good knowledge in Matlab. I will deliver you this project within 5 hours.

€19 EUR 1日以内
(レビュー1件)
0.0