Hi everyone, thanks in advance for any help you will provide me.
I'm struggling with a - in my opinion - basic problem involving the symbolic function solve and 3 easy inequalities: even though a solution does exist, matlab doesn't return it as output. Here is the code:
s = read_txt('test_mat.txt');
char_filler = '0';
for i = 1:size(s,1)
ss(i) = rmmissing(s(i));
s = ss;
for i =1:size(s,2)-11
strin = s(i);
position = regexp(strin,'');
dim = length(position);
for j = 1:dim
pos = position(j)*(j==1)+(position(j)+(j-1))*(j>1);
sym_table = str2sym(new_s);
sym_table = str2sym(s);
clearvars -except sym_table new_s s
soluzione = solve(sym_table,'ReturnConditions',true);
While the .txt files is simply (14 lines)
I already proved that the extraction of line is fine, and so is the final system of expressions (sym_table, 3 expressions inside as expected). The problem arises when MATLAB tries to solve it, in fact it returns the warning
Warning: Unable to find explicit solution. For options, see help.
However, with another .txt file
A solution if found.
I tried explicing the 3 variable (as commented) inside solve, i tried several assumptions for them, but nothing works.
Am i missing something, or simply matlab sometimes struggles with this? Because some online solvers manage to find expressions (even for bigger sets of expressions), so i'm quite in doubt.