| 查看: 4204 | 回复: 10 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[求助]
求助matlab for循环中的赋值问题。 已有2人参与
|
||
|
dm=0.001*2*pi*c; w=-0.5*2*pi*c:dm:0.5*2*pi*c; Kx=zeros(size(w)); Ay=zeros(size(w)); for m=1:length(w); syms ay kx ky; y=(0.0382*8*(pi^3)*(c^4)*sqrt(ainf-(wp.^2)./(w.^2)))./((wp^2).*w); axx=ainf*((1-(wp*(w+1i*y)*wp))./(w.*(((w+1i*y).^2)-((wc)^2)))); %无单位 axy=ainf*(((wp^2)*wc*1i)./(w.*(((w+y*1i).^2)-((wc)^2)))); %无单位 azz=ainf.*((1-(wp^2))./(w.*(w+1i*y))); %无单位 a1=real(axx); a2=imag(axx); a3=real(axy); a4=imag(axy); a5=real(azz); a6=imag(azz); f1=ay-sqrt((kx.^2)-((w./c).^2)); f2=kx-((sqrt(((a4.*ay./2).^2))+(a1.*(w./c).^2)-((a1.*ay.*ky)./(tan(ky.*t))))-(a4.*ay./2)); f3=ky-(sqrt((((w./c).^2).*(a1-((a4.^2)./a1)))-kx.^2)); [kx,ay]=solve('f1','f2','f3'); Kx(m)=kx; Ay(m)=Ay; end 运行提示:在赋值 A( = B 中,A 和 B 中的元素数目必须相同。出错行数: Kx(m)=kx; Ay(m)=Ay; 跪求大神解惑。。。 |
» 猜你喜欢
计算机、0854电子信息(085401-058412)调剂
已经有4人回复
基金申报
已经有3人回复
国自然申请面上模板最新2026版出了吗?
已经有9人回复
溴的反应液脱色
已经有6人回复
纳米粒子粒径的测量
已经有7人回复
常年博士招收(双一流,工科)
已经有4人回复
推荐一本书
已经有10人回复
参与限项
已经有5人回复
有没有人能给点建议
已经有5人回复
假如你的研究生提出不合理要求
已经有12人回复
» 本主题相关价值贴推荐,对您同样有帮助:
求助MATLAB编程
已经有8人回复
求助matlab写变限积分
已经有4人回复
求助Matlab
已经有0人回复
求助matlab图像
已经有0人回复
求助matlab求解三元超越方程
已经有4人回复
求助matlab三维图纠正程序
已经有2人回复
求助matlab有限差分程序
已经有1人回复
求助matlab写循环
已经有6人回复
求助MATLAB画图,二维曲线,总是出错,求助高手
已经有3人回复
matlab求助
已经有4人回复
Matlab求助
已经有6人回复
求助matlab问题
已经有5人回复
求助matlab程序
已经有3人回复
求助matlab问题
已经有5人回复
高金求助matlab解微分方程组
已经有12人回复
求助matlab程序
已经有4人回复
求助matlab积分的问题
已经有4人回复
matlab求助
已经有1人回复
4楼2016-09-16 15:38:26
2楼2016-09-16 13:07:16
3楼2016-09-16 14:43:59
FMStation
至尊木虫 (知名作家)
- 应助: 591 (博士)
- 贵宾: 0.03
- 金币: 18173.2
- 红花: 97
- 帖子: 8891
- 在线: 1487.4小时
- 虫号: 2400059
- 注册: 2013-04-04
- 专业: 计算机应用技术
【答案】应助回帖
感谢参与,应助指数 +1
|
https://www.mathworks.com/help/symbolic/solve.html Return Numeric Solutions Try solving the following equation. The symbolic solver cannot find an exact symbolic solution for this equation, and therefore issues a warning before calling the numeric solver. Because the equation is not polynomial, an attempt to find all possible solutions can take a long time. The numeric solver does not try to find all numeric solutions for this equation. Instead, it returns only the first solution it finds. |
5楼2016-09-16 21:56:31












= B 中,A 和 B 中的元素数目必须相同。
回复此楼