MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > how to make input size the same as output in inter... 

Subject: how to make input size the same as output in interp2 From: hanciong Date: 25 Jan, 2013 17:34:08 Message: 1 of 5 
Hello all, I have a problem. I have the following scipt to make 2D interpolation of some function fu(x,y) = x^2yy^2x. There is no problem if both x and y are scalars. However, if I call fuint with x scalar and y row vector for example, the output is column vector. also, if I call fuint with x column vector and y scalar, the output is row vector. see the two lines in which I write comment %>problem here. The problem is that, quadgk can't integrate @(y) fuint(3,y), because input size is not the same as output. how should I modify this such that the size of the output is the same as input, if either x or y is scalar? Thanx ========================================== 
Subject: how to make input size the same as output in interp2 From: Bruno Luong Date: 25 Jan, 2013 21:08:08 Message: 2 of 5 
"hanciong" wrote in message <kdufmg$ha6$1@newscl01ah.mathworks.com>... 
Subject: how to make input size the same as output in interp2 From: hanciong Date: 7 Mar, 2013 20:37:08 Message: 3 of 5 
But then what should I do if I want to integrate this interpolation function? The quad2d or integral2 or whatever make input of x and y arbitrarily; I can't force them to expand x input or y input to have same size. 
Subject: how to make input size the same as output in interp2 From: Bruno Luong Date: 7 Mar, 2013 22:14:08 Message: 4 of 5 
"hanciong" wrote in message <khatpk$bpv$1@newscl01ah.mathworks.com>... 
Subject: how to make input size the same as output in interp2 From: hanciong Date: 4 May, 2013 10:48:09 Message: 5 of 5 
Hello, 
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.