- #1

jaejoon89

- 195

- 0

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- MATLAB
- Thread starter jaejoon89
- Start date

- #1

jaejoon89

- 195

- 0

- #2

mikeph

- 1,235

- 18

Try a loop within a loop to go through all x values then all y values?

Code:

```
z = zeros(1000);
for x= 1:1000
for y = 1:1000
z(x,y) = x + y;
end
end
```

- #3

matonski

- 166

- 0

Code:

```
[x y] = meshgrid(1:1000);
z = x + y;
```

- #4

mfarooq52003

- 22

- 0

Can anyone help how to write the matrix

A=[ 2 1 0 0 0

0 2 1 0 0

1 0 2 1 0

0 1 0 2 1

0 0 1 0 2]

I need A with the above pattern of any dimension n and also a vector of the form

v=[3 3 4 4 4 4 .........4 3 3]^T where v can be of any dimension. I'll be grateful for your help.

Share:

MATLAB
MATLAB! Question

- Last Post

- Replies
- 1

- Views
- 2K

MATLAB
Matlab question

- Last Post

- Replies
- 1

- Views
- 2K

MATLAB
Matlab question

- Last Post

- Replies
- 2

- Views
- 1K

MATLAB
Matlab question!

- Last Post

- Replies
- 3

- Views
- 5K

MATLAB
MATLAB question

- Last Post

- Replies
- 3

- Views
- 3K

MATLAB
Matlab question

- Last Post

- Replies
- 5

- Views
- 3K

MATLAB
MatLab Question

- Last Post

- Replies
- 2

- Views
- 2K

MATLAB
Matlab question

- Last Post

- Replies
- 1

- Views
- 2K

MATLAB
Matlab Question,

- Last Post

- Replies
- 2

- Views
- 5K

MATLAB
Matlab Question

- Last Post

- Replies
- 4

- Views
- 2K