equation

Revert MinMax scaling

爱⌒轻易说出口 提交于 2019-12-13 04:13:14
问题 I have an array of value (percentages) scaled from 0 to 100: [34, 34, 84, 28, 56, 56, 0, 0, 100] I know that these values have been scaled with a MinMax scaler: V = (actual - min) / (max - min) And then multiplied by 100 to have the percentages above. I didn't perform this transformation so I don't have actual, min, or max. But I have V. I wanted to use numpy.linalg.solve , but I obviously can't express V as a linear/independent combination of actual, min, max. Is it a known problem? 回答1:

solve second order ODE in MATLAB/SIMULINK

自闭症网瘾萝莉.ら 提交于 2019-12-12 21:37:50
问题 I don't know how to solve this second order ODE in SIMULINK: I rewrote it to the system of first order ODEs: then giving My SIMULINK blocks are here: giving this Scope: This is the plot of symbolic solution from dsolve : It looks like the functions (plots) from symbolic and SIMULINK are little similar. 回答1: The solution was found by Phil Goddard . His answer in comments: In Simulink you are plotting y_dot, while the symbolic solution is a plot of y. So the problem was that Scope was plotting

Using the 'solve' function

余生颓废 提交于 2019-12-12 04:55:38
问题 I would like to solve an equation for x, and i know that there are atleast two solutions,which means that jj will be a vector. I need the largest of those solutions - that is were max(jj) comes into play. However z = max(jj) will give me the biggest number, but it does not evaluate it. for example z could be = 2*3^4 + 1 . In this form i can't send this "number" to another function which I want to do. the 'k' is a given number not a variable. (say k=10 or any other number) syms x eqn = x + (k

rmarkdown equation in Word non-numbers are q‌u‌e‌s‌t‌i‌o‌n marks

走远了吗. 提交于 2019-12-12 02:00:25
问题 In RStudio rmarkdown equation symbols not reproduced in Word. When I click Knit Word this "$A = \pi*r^{2}$" becomes this in the Word doc "? = ? * ?^2" no problem with html, pdf 来源: https://stackoverflow.com/questions/26719753/rmarkdown-equation-in-word-non-numbers-are-question-marks

Transcendental Equation

此生再无相见时 提交于 2019-12-12 01:59:35
问题 I've faced a task to solve a transcendental equation: K = K0*(exp(-t*B)/1+L*B) Variable 'B' is unknown. I have to take the next expression for B for a first step: B = (K0-1)/(L+t) For the second step and for all the next steps I have to calculate B as: B = -(1/t)*ln((1+L*B)/K0) The iteration stops when relative difference between the previous and the current value for B doesn't exceed, say, 1%. The resulting B should make the first equation right part be equal to 1. How can I do it with

Solve for influence of nodes in graph in Matlab

末鹿安然 提交于 2019-12-12 01:10:12
问题 I have a directed, unweighted graph with 5 nodes: x1 through x5. The edges are: x1->x3 x2->x1 x2->x5 x3->x2 x3->x4 x4->x5 x5->x2 I want to solve this set of equations corresponding to the graph: x1 = alpha * x2 x2 = alpha * (x3 + x5) x3 = alpha * x1 x4 = alpha * x3 x5 = alpha * (x2 + x4) x1 + x2 + x3 + x4 + x5 = 1 How can I set up these equations and solve in Matlab? I want the values of x1 through x5 for which the equations hold. 回答1: Here is the solution that worked for me: syms a b c d e

c++ implementation of quadratic equation, throws an error when implemented on a school testing website

无人久伴 提交于 2019-12-12 00:30:59
问题 I am trying to solve a very simple task tested by my univeristy's code checker. The code is about a c++ implementation of the equation of the quadratic equation. The code won't work for all cases, I am supplying my code, and if there is some comment, hint, please help me with it. Code: #include <iostream> #include <math.h> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int a, b, c, delta; double x1, x2, x; cin >> a >> b >> c; delta = (

Converting symbolic expression to function handle in Matlab R2013b

浪尽此生 提交于 2019-12-11 19:56:53
问题 I am struggling to convert a function, which I require for my civil engineering project, from symbolic expression. I need to use fzero to find the root of the function. Here H should be the variable and I need to find out the value of H . The function goes like function x_c = f_x_c(s,H0,VA,Lo,qc,EAo,NF,Sj,Fj) if (s < 0) || (s > Lo) disp('The value of s is invalid') disp(['s = ' num2str(s)]); return end C1 = H/qc; if NF == 0 n = 0; sn = 0; sum_Fj = 0; end if NF >= 1 Sj_Q = [0; Sj; Lo];

Number of Zero-crossings - Equation

梦想与她 提交于 2019-12-11 11:55:21
问题 I have written an algorithm that calculates the number of zero-crossings within a signal. By this, I mean the number of times a value changes from + to - and vice-versa. The algorithm is explained like this: If there are the following elements: v1 = {90, -4, -3, 1, 3} Then you multiply the value by the value next to it. (i * i+1) Then taking the sign value sign(val) determine if this is positive or negative. Example: e1 = {90 * -4} = -360 -> sigum(e1) = -1 e2 = {-4 * -3} = 12 -> signum(e2) =

sympy: PolynomialError: cos(a) contains an element of the generators set

让人想犯罪 __ 提交于 2019-12-11 10:44:42
问题 While using sympy (current version) to solve an polynomial equation (polynom would be d² in this case): from sympy import solve_poly_system solve_poly_system(4*d**2*sin(a)**2*sin(b)/cos(b)**2 - d*cos(a) + 4, d**2*sin(a)**2*sin(b)/cos(b)**2 - d*cos(a) + 8, 3*d**2*sin(a)**2*sin(b)/cos(b)**2 - d*cos(a) + 3 ,d ,a, b) I receive the following error: PolynomialError: cos(a) contains an element of the generators set What is the exact meaning of this error message. And why does it specifically points