Re: update table with matlab



I connected Matlab with Ms sql server, and I have to insert 4 column of
data(from Matlab) on 1 table (to sql server) with 4 column...
I tryed with :

conn=database('matlab-sql','','')
colnames = {'start','_end','proc_name','orbit_num'}
exdata = {V1c,V2c,V3c,V4c}
insert(conn,'times_even',colnames,exdata)
close(conn)

but the error is:


??? Error using ==> horzcat
All matrices on a row in the bracketed expression must have the
same number of rows.

Error in ==> database.insert at 141
tmpstr = ['''' tmp ''''];



I have 4 column of data into 4 array and I have to insert this 4
column into 1 table with 4 column.... the table

Ken Fleisher ha scritto:

rbaldassarre wrote:


hi...



if I use insert command, I obtain the second column that start
after
the end of first column, and the third column start after the end
of
second column... etc..etc..

should I use the 'update' command ?

How can I do ???



I'm not certain that I understand your question exactly, but are you
simply trying to make your 4 columns into a 4x4 matrix? If so, then
try something like this:

% The four column vectors are c1, c2, c3, and c4
c = [c1, c2, c3, c4];

Is this what you mean? If not, please explain better.

Ken

.



Relevant Pages