Calculate an unknown equation coefficient

 Respuesta aceptada

Star Strider
Star Strider el 7 de Abr. de 2018
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 comentarios

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

Iniciar sesión para comentar.

Más respuestas (6)

AAK
AAK el 8 de Abr. de 2018

0 votos

Hi mate,
Many thanks.
Regards, Ahmed
AAK
AAK el 8 de Abr. de 2018

0 votos

No worries mate,
Sure, accepted, please let me know if anything else is required!

1 comentario

Star Strider
Star Strider el 8 de Abr. de 2018
You first must un-accept your Answer in order to Accept my Answer.

Iniciar sesión para comentar.

AAK
AAK el 8 de Abr. de 2018

0 votos

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 el 8 de Abr. de 2018

0 votos

Thanks for this.
Cheers,
AAK
AAK el 8 de Abr. de 2018
Editada: AAK el 22 de Abr. de 2018

0 votos

Thanks

1 comentario

Star Strider
Star Strider el 8 de Abr. de 2018
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.

Iniciar sesión para comentar.

AAK
AAK el 9 de Abr. de 2018

0 votos

Thanks, mate.

Categorías

Más información sobre Distillation Design en Centro de ayuda y File Exchange.

Preguntada:

AAK
el 7 de Abr. de 2018

Editada:

AAK
el 22 de Abr. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by