[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
What should I do to fix "warning: implicit conversion from real matrix t
From: |
John B. Thoo |
Subject: |
What should I do to fix "warning: implicit conversion from real matrix to real scalar"? |
Date: |
Wed, 8 Jul 2009 07:25:24 -0700 |
Hi, everyone.
I have a 512 x 161 matrix of values u(x,t) saved in a file
"ht_tf8M160ord9visc01.mat".
I write a function and invoke quad in a file "energy.m" thus:
%%--------begin energy.m---------
1;
function y = h (x)
load ht_tf8M160ord9visc01.mat u;
x = u(:,5);
y = x.^2;
endfunction
quad ("h", 0, 1)
%%---------end energy.m----------
then I get this:
octave-3.0.5:31> energy
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
warning: implicit conversion from real matrix to real scalar
ans = 0.16711
octave-3.0.5:32>
What should I do to fix the warning "implicit conversion from real
matrix to real scalar"?
Btw, my eventual goal is to define a function P(t) = \int H(u(:,t))
dx for some function H(x). Does it look like my M-file is on the
right track?
Thanks for your help.
---John.
- What should I do to fix "warning: implicit conversion from real matrix to real scalar"?,
John B. Thoo <=