(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Hi,

Just wondering if someone could please steer me in the right dirrection for the correct syntax in matlab. I am trying to create a variable from an array of numbers and combine it with the letter k, to give me k1=[] k2=[] k3=[] etc. where [] is a 3x3 matracie

2. Relevant equations

3. The attempt at a solution

This isn't the problem I am working on but the solution to this would be a great help.

a=[1 3];

['k' int2str(a(2))]=[0 1 2;1 2 3;0 1 2]

??? Error: An array for multiple LHS assignment cannot contain character string.

Trying to get this

k3 =

0 1 2

1 2 3

0 1 2

Thanks

Elbarto

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Quick matlab question

**Physics Forums | Science Articles, Homework Help, Discussion**