# MATLAB: An Array of Equations to solve for 1 variable

arrayengineeringequationsMATLAB

I have the following code currently:
``L = 3; %Wheelbase in meters%w = 1.7; %Track in meters%d = 0.25; %length of nonparallel arm in meters%B = 14; %Beta: Given value%I = -30:5:30; %Perameters for inner steering  angle%syms Yeqn2 = ((sind(B+I))+(sind(B-Y)))==((w/d)-(sqrt((((w/d)-(2.*sin(B))).^2)-(((cosd(B-Y))-(cosd(B+I))).^2))));sol = solve(eqn2,Y);disp(sol)``
I am trying to solve for the 'Y' variable in eqn2 with 'I' changing. The current code is giving me an array of equations all with the variable 'Y' in them but i am not sure on how to solve for those 'Y' values in a way that it will come back an array that I can use to find another variable.

``L = sym(3); %Wheelbase in meters%w = sym(1.7); %Track in meters%d = sym(0.25); %length of nonparallel arm in meters%B = sym(14); %Beta: Given value%I = sym(-30:5:30); %Perameters for inner steering  angle%syms Y%note correction from sin(B) to sind(B)eqn2 = ((sind(B+I))+(sind(B-Y)))==((w/d)-(sqrt((((w/d)-(2.*sind(B))).^2)-(((cosd(B-Y))-(cosd(B+I))).^2))));sol_cell = arrayfun(@solve, eqn2, 'uniform', 0);sol = horzcat(sol_cell{:});``