Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
errot appear "matrix dimension must agree"

Subject: errot appear "matrix dimension must agree"

From: amira ali

Date: 21 May, 2011 18:13:02

Message: 1 of 2

please i need help, can anyone reply me as soon as possible
when i read values from text file and store it in vector as follow:
----------------------------------------------------------------------------------------------------------------
fid=fopen('running\x.txt','rb') % opens the file for reading
t = fread(fid) % reads elements and stores them in T.
fid_y=fopen('running\y.txt','rb') % opens the file for reading
 r = fread(fid_y) % reads elements and stores them in R.
 so i have two vector t,r with diff size
>> whos t r
  Name Size Bytes Class

  r 183069x1 1464552 double array
  t 183087x1 1464696 double array

---------------------------------------------------------------------------------------------------------------

when i use t,r in function give me the following error

>> dtw(t,r)
??? Error using ==> minus
Matrix dimensions must agree.

Subject: errot appear "matrix dimension must agree"

From: Roger Stafford

Date: 21 May, 2011 18:38:02

Message: 2 of 2

"amira ali" wrote in message <ir8vbe$ppi$1@newscl01ah.mathworks.com>...
> >> whos t r
> Name Size Bytes Class
>
> r 183069x1 1464552 double array
> t 183087x1 1464696 double array
>
> when i use t,r in function give me the following error
>
> >> dtw(t,r)
> ??? Error using ==> minus
> Matrix dimensions must agree.
- - - - - - - - -
  The first three lines of Timothy Felty's 'dtw' function are sufficient to indicate that row vectors, not column vectors, are expected.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us