フィルターのクリア

Getting warning while running the attached code!!

3 ビュー (過去 30 日間)
MG
MG 2022 年 3 月 30 日
編集済み: MG 2022 年 3 月 30 日
clear all;
close all;
clc;
syms x
E = 30e3;
s_u= 114;
k_p = 154;
n_p = 0.123;
s_f_p = 169;
e_f_p =1.14;
b = -0.081;
c = -0.67;
N = logspace(0,6); % 2N_f
k_f = 2.22;
s_nom = 50;
s_e_peak = (k_f*s_nom)^2/E
eqn = x*((x/E) + (x/k_p)^(1/n_p)) == 0.4107;
sol = solve(eqn)
Warning: Solutions are parameterized by the symbols: z2. To include parameters and conditions in the solution, specify the 'ReturnConditions'
value as 'true'.

採用された回答

Walter Roberson
Walter Roberson 2022 年 3 月 30 日
That is not an error.. but it can be a nuisance.
format long g
syms x
E = 30e3;
s_u= 114;
k_p = 154;
n_p = 0.123;
s_f_p = 169;
e_f_p =1.14;
b = -0.081;
c = -0.67;
N = logspace(0,6); % 2N_f
k_f = 2.22;
s_nom = 50;
s_e_peak = (k_f*s_nom)^2/E
s_e_peak =
0.4107
eqn = x*((x/E) + (x/k_p)^(1/n_p)) == 0.4107;
sol = solve(eqn, 'returnconditions', true)
sol = struct with fields:
x: z2^123 parameters: z2 conditions: 1875*154^(107/123)*z2^1123 + 3044854222373485984*z2^246 - 37515648873863720808864 == 0 & -pi/123 < angle(z2) & angle(z2) <= pi/123
cond1 = children(sol.conditions,1)
cond1 = 
p = sym2poly(lhs(cond1));
z_sols = roots(p);
cond2 = children(sol.conditions,2) & children(sol.conditions,3)
cond2 = 
mask = simplify(subs(cond2, z_sols));
valid_sols = z_sols(logical(mask));
overall_sol = vpa(subs(sol.x, sol.parameters, valid_sols))
overall_sol = 
  1 件のコメント
MG
MG 2022 年 3 月 30 日
編集済み: MG 2022 年 3 月 30 日
Thats a warning. My bad. btw thank you so much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by