简体   繁体   English

将具有2个有界未知变量的多变量函数与图形表示的值进行匹配

[英]matching a multi-variable function with 2 bounded unknown variables to a value with graphical representation

My question is about matching this function: N = 0.13*(s^a), where s and a are variables, to a value. 我的问题是关于匹配此函数:N = 0.13 *(s ^ a),其中s和a是变量,与一个值匹配。 I am trying to find all values of s and a that satisfy N = 100 and N = 10,000,000. 我试图找到s和a的所有值,它们满足N = 100和N = 10,000,000。 S is bounded from 0 to 101 and a is bounded from 3 to 8. And I would like to visualize the results possibly by graphing it with the axes being s and a, like a 2D plot. S的范围是0到101,a的范围是3到8。我想可视化结果,方法是将其绘制为轴为s和a,如2D图。 The algorithms I found that were similar to what I need seemed to all want to find the minimum or maximum of a function instead of matching it to a value. 我发现的算法与我所需要的算法相似,所有人都想找到函数的最小值或最大值,而不是将其与值匹配。 I have hit a wall and I don't know if my coding skills are high enough to write my own algorithm. 我碰壁了,我不知道我的编码技能是否足以编写自己的算法。 Any help would be greatly appreciated! 任何帮助将不胜感激! Thanks in advance! 提前致谢!

This can easily be converted to a minimization problem. 这很容易转化为最小化问题。 Simply minimize this function: 只需最小化此功能:

abs(0.13 * s ^ a - 100)

Replace the 100 with 10,000,000 for the second part. 第二部分将100替换为10,000,000。 It will take some modification to find all values of s and a , rather than just one pair. 需要进行一些修改才能找到sa 所有值,而不是一对。 This could be done by fixing an s value and minimizing over a , then repeating for different s values. 这可以通过固定一个来完成s值并最小化在a ,然后重复用于不同s值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM