In my FEM program, I want to build a matrix bcdof[1;2;7;8;67;68;69;70;71;72] from matrix bcdof1=[1;4;34;35;36] but the program say that "Index exceeds matrix dimension". Can anyone help me, here is my code:bcdof1=[1;4;34;35;36];bcdof=zeros(1,2*length(bcdof1));for i=1:length(bcdof1) bcdof(1,(2*i-1))=2*bcdof1(1,i)-1; bcdof(1,(2*i))=2*bcdof1(1,i);end
MATLAB: How to fix the error “Index exceeds matrix dimension”
index exceeds matrix dimensions
Related Question
- Need to copy value from one matrix (short) into another matrix (long) such that it repeats multiple times
- Subtract raws of a matrix from an array
- How to extract the column first of matrix based on the values of the second column in the matrix?
- Remove cell array content matrix with condition: length of element in cell smaller than specific value
- How can find a same values in another matrix and copy the row
- Removing rows of a matrix based on certain criteria
Best Answer