Calculate an unknown equation coefficient

 采纳的回答

You can certainly use fminsearch for your problem, however since you are regressing a linear system, you can use mldivide,\ (link) effectively:
X = randi(9, 10, 3); % Define ‘X’ As A (Nx3) Matrix
Y = randi(9, 10, 1); % Define ‘Y’ As A (Nx1) Matrix
DM = [ones(size(X,1),1) X.^2]; % Design Matrix
abcd = DM \ Y; % Estimate Parameters
fid = 1;
fprintf(fid, 'a = %5.2f\nb = %5.2f\nc = %5.2f\nd = %5.2f\n\n', abcd)
Your system is linear because the partial derivatives of the parameters are not functions of themselves or of other parameters. If they were, your system would be nonlinear, and fminsearch would be an appropriate solver.
I created ‘X’ and ‘Y’ here to demonstrate the code (and to test it to be certain I had not made any errors in coding it). Substitute your own data for them.
I have no experience with Aspen Plus® (link) so I cannot help you with it.

4 个评论

Ahmed Alketife’s Answer nmoved here:
Hi mate,
Many thanks.
Regards, Ahmed
My pleasure.
If my Answer helped you solve your problem, please Accept it!
(You will have to un-accept your own accepted answer first.)
Hi mate,
It's, indeed, very helpful. Thanks again.
If my Answer helped you solve your problem, please Accept it!

请先登录,再进行评论。

更多回答(6 个)

AAK
AAK 2018-4-8
No worries mate,
Sure, accepted, please let me know if anything else is required!
AAK
AAK 2018-4-8
How to do this? because of I already clicked on my profile photo, I found this option is already accepted, whereas your has no option like that? would please clarify?
AAK
AAK 2018-4-8
编辑:AAK 2018-4-22
Thanks

1 个评论

The only links I can find that may be relevant are:
You may need to use the Contact Us link in the upper right corner of this page to ask MathWorks any other questions you may have about using MATLAB with Aspen Plus.

请先登录,再进行评论。

类别

在 帮助中心 和 File Exchange 中查找有关 Distillation Design 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by