- #1
Margarett
- 3
- 0
Hello! Below is the code for the following task:
Q=[];
A={1, [3 5 8]} % array of cells
for j=1:2 % matrix column index
for i=1:3 % matrix row index
if j==1
Q(i,j)=A{1,j};
else
Q(i,j)=A{1,j}(1,i);
end
end
end
Q
conn = database('QWERT', '', '');
colnames = {'u1', 'u2'};
insert(conn, 'Rtu', colnames, Q);
close(conn);
[/ код]
- matrix "Q" with a dimension of 3*2 was obtained using a matrix of cells "A";
- then the matrix "Q" is exported to Microsoft Access with the same dimension (3 rows, 2 columns).
- Error using database/insert (line 213) General error
- Error in test_matlab (line 22) insert(conn, 'Rtu', colnames, Q);
- I use MATLAB version R2014b.
- Below there is an archive with files.
- I am using the MATLAB version R2014b.
- Below is an archive with files.
Q=[];
A={1, [3 5 8]} % array of cells
for j=1:2 % matrix column index
for i=1:3 % matrix row index
if j==1
Q(i,j)=A{1,j};
else
Q(i,j)=A{1,j}(1,i);
end
end
end
Q
conn = database('QWERT', '', '');
colnames = {'u1', 'u2'};
insert(conn, 'Rtu', colnames, Q);
close(conn);
[/ код]