Error while converting a HUGE symbolic equation to double (question edited and simplified further)
2 次查看(过去 30 天)
显示 更早的评论
[Question edited and simplified further]
Hi.
I perform huge computations worth 70 lines. After those 70 lines, i have these equations in my internal memory.
%(stored internally) Wnet=(99*((57443*((4018*y*(66875/(57036*x))^(2528214091580831/18014398509481984))/5 - (57443*y)/50 + (2894969*x^(200/623))/50))/(50*((57443*y)/50 - 41160000)) + 57443/50)*(y - y*(66875/(57036*x))^(2528214091580831/18014398509481984)))/100 + (99*(y - y*(66875/(57036*x))^(2528214091580831/18014398509481984))*((57443*((4018*y*(66875/(57036*x))^(2528214091580831/18014398509481984))/5 - (57443*y)/50 + (2894969*x^(200/623))/50))/(50*((57443*y)/50 - 41160000)) - (57443*((57443*y)/50 - (57443*y*(66875/(57036*x))^(2528214091580831/18014398509481984))/50))/(50*((57443*y)/50 - 41160000)) + 57443/50))/100 - (2894969*x^(200/623))/10 + 2894969/10;
%(stored internally) SFC=-(((57443.*y)./50 - (57443.*y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984))./50)./((57443.*y)./50 - 41160000) - ((4018.*y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984))./5 - (57443.*y)./50 + (2894969.*x.^(200./623))./50)./((57443.*y)./50 - 41160000))./((99.*((57443.*((4018.*y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984))./5 - (57443.*y)./50 + (2894969.*x.^(200./623))./50))./(50.*((57443.*y)./50 - 41160000)) + 57443./50).*(y - y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984)))./100 + (99.*(y - y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984)).*((57443.*((4018.*y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984))./5 - (57443.*y)./50 + (2894969.*x.^(200./623))./50))./(50.*((57443.*y)./50 - 41160000)) - (57443.*((57443.*y)./50 - (57443.*y.*(66875./(57036.*x)).^(2528214091580831./18014398509481984))./50))./(50.*((57443.*y)./50 - 41160000)) + 57443./50))./100 - (2894969.*x.^(200./623))./10 + 2894969./10);
How do i convert this huge symbolic equation to a 6x5 double array where x=5:5:30; y=1100:100:1500;
Help me please =)
If you are still confused with the question, let me know, i will try to clarify it more, or i will paste the entire script.
0 个评论
采纳的回答
Alexander
2012-4-13
Does this work?
subs(subs(Wnet, x, 5:5:30)', y, 1100:100:1500)
respectively
subs(subs(SFC, x, 5:5:30)', y, 1100:100:1500)
更多回答(1 个)
Walter Roberson
2012-4-13
[X, Y] = ndgrid(5:5:30, 1100:100:1500);
WnetF = matlabFunction(Wnet, x, y);
WnetN = double( arrayfun( WnetF, X, Y ) );
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!