Study Of Math Study Of Math Math

Tudy Of Math Save Studyofmath U Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets Ldymls Szh 1 Study Of Math Habitat: MathTools/FAQ

Tudy Of Math Save Studyofmath U Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets Ldymls Szh 1 Study Of Math

  Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  Szh  Tudy  searcht Save d Tudy o Math m Ldymls t Save ssearcha Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets c Save Sh Szh Tdy Szh ersearchh Ldymls se Tudy r Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets h Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  SsearchvesearchM  Ldymls osearchered Math 2Bby%2mysearchB% Ldymls B Szh risearchtasearchle% Tudy B Ldymls asearchh Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets 2w Save rsearchsh Studyofmath es Ldymls t M Studyofmath tsearch search searchuy search Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  Szh esearchtoi Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets ai Math nsearch Math search Studyofmath searchsearch Save  Ldymls  Tudy searchsearchsearchsearch Studyofmath search Math search Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  Tudy 
 Szh  Tudy searchosearch Studyofmath  Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  Tudy  Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets search Szh  Math  Tudy vsearchlsearchisearchl Math n Studyofmath  Math  Szh  Tudy  Math  Save  Math  Save searchsearch Math search Ldymls  Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets searchsearch Ldymls  Szh  Szh searchsearch
 Save  Math  Szh search Ldymls  Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets  Szh search
 Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets 


[返回]

2.40. .Matlab中如何作非线性回归?

#FangQ, 2002/6/22. BigGreen/en_Matlab#

 请参考
 support/solutions/data/10652.shtml

 matlab默认只提供了多项式拟合的函数polyfit,对于其他稍微简单
 一点的拟合,如标准的指数、对数、高阶多项式拟合,都有解析公式,参见:
 LeastSquaresFitting.html
 对于更加复杂的非线性函数,建议使用Mathematica或者DataFit

 Mathematica中提供了Fit[],以及
 << Statistics`NonlinearFit`
 NonlinearFit[],NonlinearRegress[]
 可以拟合任意复杂的表达式。

 DataFit可以自定义拟合模型,适用于复杂系统的拟合。


[返回]

2.41. .Matlab中为什么我对m文件、simulink模块,mat文件的修改不起作用呢?

hyphone,2002/7/6,SMTH/MathTools#

 检查Matlab路径中是否有与你的m文件、mdl文件或者mat文件同名的m文件、
 mdl文件或者mat文件。Matlab执行搜索到的第一个文件。


[返回]

2.42. .Matlab中,函数里面怎样使用基本工作空间中的变量?

为什么inline函数不能使用外面的变量?
hyphone,2002/7/6,SMTH/MathTools#

 函数只能存取它自己的工作空间中的变量。要在函数之间,或者函数与基本
 工作空间之间传递数值,尝试以下方法:
 1、使用全局变量,用global定义全局变量
 2、使用evalin:
 evalin('base','v=1;'); %在基本工作空间中执行命令:v=1;
 evalin('caller','v=1;');%在调用该函数的函数的工作空间中
 执行命令:v=1;
 3、参数传递
 4、使用assignin:
 assignin('base','v',v); %将v赋给基本工作空间中的变量v;
 assignin('caller','v',v); %将v赋给调用者工作空间中的变量v;
 inline函数里面只能出现函数和参数,要传递一个可变系数,需要用evalin。
 如:fzero('f(evalin(base,x1(i)),x3)',求解区间)


[返回]

2.43. .怎样在Simulink中调用m文件?

hyphone,2002/7/6,SMTH/MathTools#

 函数m文件可以使用Function & Tables中的Fcn模块。如果有多个输入,
 用Mux组合成一个向量,然后在Fcn模块的Expression填
 MyFunction(u(1),u(2))"。如果有多个输出,用Demux分解成多个标量。


[返回]

2.44. .Matlab中怎样进行数制转换?

hyphone,2002/7/6,SMTH/MathTools#

 参见:hex2dec,oct2dec,bin2dec,dec2bin,dec2oct,dec2hex.


[返回]

2.45. matlab中的*.p是什么文件?怎么用?

#David Martin(dg.martin@home.deleteme.com), 2000/07/07,comp.soft-sys.matlab#

 p文件是pre-parsed的缩写,即matlab在第一次运行某m文件时,matlab把该
 文件先编译成一种matlab的pseudo-code,当你再次运行该m文件时,节省了
 parse的时间。

 p文件可以离开m文件单独运行
</a>

#Mike Robbins (michael.robbins@us.cibc.com),2001/04/20,comp.soft-sys.matlab#

 在matlab中用pcode('yourfilename')来生成p文件


[返回]

2.46. 在Matlab中有goto语句吗?

#FangQ, 2002/7/23. BigGreen/en_Matlab#

 matlab中没有提供goto,因为结构化程序设计不推荐使用goto,但在matlab
 中,goto的功能可以部分用结构化的异常处理机制来实现,比如从多重循环
 中跳出,具体代码为:

 try
 for i=1:10
  for j=1:10
 for k=1:10
  do_something;
 if(jump_condition)
  errorid=-2;
  error('I want to get out!');
 end
 end
  end
 end
 catch
 fprintf(1,'catch error:%d',errorid);
 end


[返回]

2.47. 请问matlab6.X的那个matlab server是做什么的?(matlab开机运行问题)

#hairhead, 2002/4/3. SMTH/MathTools#

  如果你在安装matlab时选择了web server的话,在每次重新启动后系统
  进程中就会出现matlab/matlabserver两个进程,如果你不需要使用
  matlab webserver服务的话,建议在安装时不要选择web server,
  如果已经安装的话,可以在"控制面板->管理工具->服务"中找到
  matlab webserver,然后把它disable掉。


[返回]

2.48. Matlab中如何用鼠标取得坐标?

#FangQ, 2002/11/19. BigGreen/en_Matlab#

  matlab中用ginput来取得图像上的一点。注意:image()/imagesc()对象
  的y轴是和一般图的y轴反的。

  如果复杂的话,可以在ButtonDownFcn中get(0,'PointerLocation')
  或者get(gcf,'Position');


[返回]

2.49. Matlab中有阶乘函数吗?

#FangQ, 2002/7/23. BigGreen/en_Matlab#

  matlab没有提供直接的阶乘函数,但可以用prod(1:n)来求n!
  用prod(1:2:2n-1)或者prod(2:2:2n)来求解n!!


[返回]

2.50. .怎样才能把Maltab学精?

#energy(长白山), 2002/9/23. SMTH/MathTools#

  "带着问题学,活学活用,学用结合,急用先学,立竿见影,
  在'用'字上狠下功夫。"


[返回]

2.51. .Matlab如何计算大阶乘?

#lll, 2002/9/18. SMTH/MathTools#

  如果只需要大致的值,取log10,
  计算出result=log10(1000!)=log10(1)+log10(2)+...log10(1000)
  然后求10^result=10^result的小数部分*10^result的整数部分


[返回]

2.52. .Matlab中怎样求变上限二重积分?

#hyphone,2002/9/22, SMTH/MathTools #

 对于解析函数,用两次int即可。
 如求x+y在0<y<1;0<x<y上的积分:
 int(int('x+y','x',0,'y'),'y',0,1)


[返回]

2.53. .用符号积分算出来Ei是什么意思,怎样求值?

#hyphone,2002/9/22, SMTH/MathTools #

 Ei是maple中的指数积分函数,表示exp(-x*t)/t^n对t从1到正无穷大的积分。
 Ei(n,x) = int(exp(-x*t)/t^n, t=1..infinity)
 用命令“mhelp Ei”可以查看详细说明;用符号计算得到的不明白的函数都可以通过
 mhelp命令得到帮助。
 求Ei(1,2)可以用maple命令得到:str2num(maple('evalf(Ei(1,2))'))。


[返回]

2.54. .Maltab中使用\n换行在notepad中显示为小黑块,为什么?(Randy Poe)

#Randy Poe,2002/10/21,comp.soft-sys.matlab#</a>
#Peter J. Acklam(pjacklam@online.no),2002/6/26,comp.soft-sys.matlab#

 换行和回车是不同的,而且在不同的操作系统,解释也不相同。
 \n一般会操作系统被翻译成"行的结束",即LF(Line-Feed)
 \r会被翻译成"回车",即CR(Cariage-Return)
 对于文本文件的新行,在UNIX上,一般用\n(LF)来表示,Mac上用\r(CR)来表示,
 Windows上是用\n\r(CR-LF)来表示。

 所以在matlab中使用\n来写回车,在windows上打开会出现小方块。如果想
 避免这种情况,打开文件时使用t参数:

 fid = fopen('myfile.dat','wt');


[返回]

2.55. .Matlab中能开多大数组?(Steven Lord)

#Steven Lord (slord@mathworks.com),2002-10-22,comp.soft-sys.matlab#

 使用computer命令:
 [C,MAXSIZE] = computer


[返回]

2.56. .如何使用整型矩阵来节省内存?(Duane Hanselman)

#Duane Hanselman (masteringmatlab@yahoo.com),2002/10/22,comp.soft-sys.matlab#

 如下方法无需先生成一个double的数组,然后转换为int8

 >> rc=[3 4] % row and column sizes
 >> a(prod(rc))=int8(0) % example using int8
 >> class(a) % they are all int8s
 >> reshape(a,rc) % make it the size you want

 同时也可以使用repmat来实现上述功能:

 >> repmat(int8(0),rc)


[返回]

2.57. Matlab在P4芯片上无法启动的解决方案

#FangQ(Qianqian.Fang@dartmouth),2002/11/10,SMTH/MathTools#

 如果不想安装补丁,只能使用matlab -nojvm的形式启动
 matlab,否则需要参照如下页面的解决方案来安装补丁:
 groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=
 NQ8a9.6835%24ob2.611653%40newsread1.prod.itd.earthlink.net
 support/solutions/data/27293.shtml


[返回]

2.58. 如何求解对离散点的最优椭圆拟合?(Andrew Fitzgibbon, et al)

#Authors: Andrew Fitzgibbon, Maurizio Pilu, Bob Fisher
"Direct Least Squares Fitting of Ellipses", IEEE T-PAMI, 1999#

 ~fangq/MATH/Source/fitellipse.m


[返回]

2.59. Matlab/Mathematica中如何中断当前运算?(FangQ)

#FangQ(Qianqian.Fang@dartmouth),2002/11/19,BigGreen/MathTools#

 Mathematica中使用:  Alt+./Alt+,
 Matlab中使用: Ctrl+C


[返回]

2.60. .Matlab/Mathematica中如何检查括号匹配?(FangQ)

#FangQ,2002/11/11,SMTH/MathTools#

 Mathematica中使用:  Ctrl+.
 Matlab editor中使用: Ctrl+B


[返回]

2.61. .Matlab的GUI中为何无法使用uicontrol的句柄?(FangQ)

#FangQ,2002/11/11,SMTH/MathTools#

 如果你在执行GUI时出现"handles not defined"的错误时,
 打开GUIDE,把figure的HandleVisibility设置为on或者callback,
 则你可以在各个callback中直接使用handles,而不用声明global

 例如:

 dat=get(handles.figure1,'userdata');
 dat2=fliplr(dat);
 se(handles.edit1,'userdata');


[返回]

2.62. .Matlab中如何把向量拓展成矩阵?(Zealous/FangQ)

#Zealous/FangQ,2002/11/9,SMTH/MathTools#

 可以使用repmat(),例如: repmat([1,2,3]',1,5)
 或者使用kron(),例如:  kron([1 2 3]',ones(1,5))


[返回]

2.63. .Matlab的GUI中的按钮如何在运行时移动及改变大小?(FangQ)

#FangQ(Qianqian.Fang@dartmouth),2002/11/19,refer to comp.soft-sys.matlab#

 使用selectmoveresize函数,例如:

 figure
 h=uicontrol('style','pushbutton');
 set(h,'ButtonDownFcn',...
 'selectmoveresize;set(h,selected,off)',...
 'Enable','inactive')


[返回]

2.64. .Matlab如何求解维数巨大的稀疏矩阵方程?(FangQ)

#FangQ(Qianqian.Fang@dartmouth),2002/11/19,BigGreen/MathTools#

wTudy Of Math Save Studyofmath U Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets Ldymls Szh 1 Study Of Math Habitat: MathTools/FAQo Study Of Math Math x Study Study Of Math bTudy Of Math Save Studyofmath U Powered%2Bby%2BmyBB%2Bprintable%2Bmath%2Bworksheets Ldymls Szh 1 Study Of Math Habitat: MathTools/FAQc Study Of Math Study