Clear Filters
Clear Filters

How to rectify the following code

2 views (last 30 days)
ESWARA MOORTHI
ESWARA MOORTHI on 28 Oct 2012
Respected Sir/Madam
Please give the ideas about How to rectify the following Error code after the 25th iterations in my program.
??? Error using ==> reshape To RESHAPE the number of elements must not change.
Error in ==> sym.maple at 94 result = reshape(result,size(varargin{3}));
Error in ==> sym.int at 39 r = reshape(maple('map','int',f(:),x),size(f));
Error in ==> Esu at 55 f1(m)=vpa(h1*int(exp(t)*int(exp(-2*t)*int(exp(t)*R1(m-1))))+g(m-1)*f1(m-1),5);
Thanking you
with regards S.Eswaramoorthi

Answers (1)

Wayne King
Wayne King on 28 Oct 2012
The problem is that you are attempting to reshape a vector but you are changing the number of elements. For example:
x = randn(100,1);
y = reshape(x,20,5);
works because (20)(5) = 100
but
x = randn(100,1);
y = reshape(x,21,5);
generates the error you are getting. The same principle applies for symbolic arrays.

Categories

Find more on Material Sciences in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!