由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - help: matlab integral function
相关主题
where to define my template function[合集] matlab函数的返回变量
Default function template argumentshow to write a function take iterators as parameters?
ajax小问题今天很郁闷
如何定义 Javascript overload function ?C++ Q 103-105 (转载)
一个面试题目,用C实现C++ online Test 又一题 (转载)
static如何作为函数?javascript function-ask for help
问个问题这个function pointer最后的那个int是什么意思?
[合集] C/C++ calling function by nameWhat's the most efficient way to transform a 2d array into
相关话题的讨论汇总
话题: function话题: myint话题: error话题: integral话题: matlab
进入Programming版参与讨论
1 (共1页)
a***m
发帖数: 74
1
Hello,请高手指点:
I am using Matlab integral function. I need to integrate a function of one
variable t for different values of a parameter y. The output is a vector for
each value of the parameter y.
for example:
function f = myfunc(x, a)
b = 0.5;
f = a+quad(@myInt, 0, 0.5*pi, [], b, x);
function v = myInt(t,b,x)
v = cos(t*b).*x;
%main.m
a = 4;
x = [ 1,2,3];
f = myfunc(x,a);
I got error message says:
??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> myInt at 2
v = cos(t*b).
1 (共1页)
进入Programming版参与讨论
相关主题
What's the most efficient way to transform a 2d array into一个面试题目,用C实现
python decorator 调用问题static如何作为函数?
python 超级难题求救问个问题
c++中的inline 函数是做什么的?[合集] C/C++ calling function by name
where to define my template function[合集] matlab函数的返回变量
Default function template argumentshow to write a function take iterators as parameters?
ajax小问题今天很郁闷
如何定义 Javascript overload function ?C++ Q 103-105 (转载)
相关话题的讨论汇总
话题: function话题: myint话题: error话题: integral话题: matlab