% variable definiton % T function argument % p = f(T) values are given in form of a 69x2 double % a | b | c | h constants / parameters (defined or calculated beforehand) % equations % eqn 1 % p = interp1(p(:,1),p(:,2),T) % eqn 2 % h = a * T + p * (b + c * T) % As I am used to solve equations with my pocket calculator I quickly found something like this while browsing: syms T solve (h == a * T + interp1(p(:,1),p(:,2),T) * (b + c * T),T); % Unfortunately I do not have the required toolbox to solve equations which is why I need to find a work-around % my next idea was to use an iteration to solve this (which I did not formulate and test until now) % it would be something like that though: for T = 1:100 p = interp1(p(:,1),p(:,2),T); h_iter = a * T + p * (b + c * T); if h_iter > h - h_marge | h_iter < h + h_marge break end end % with h_marge being a predefined value for accuracy tolerance
fun = @(T) a * T + interp1(p(:,1),p(:,2),T) * (b + c * T) - h; Tfinal = fzero(fun,[p(1,1),p(end,1)]);
returns interpolated values of a 1-D function at specific query points using linear interpolation. Vector vq
= interp1(x
,v
,xq
)x
contains the sample points, and v
contains the corresponding values, v(x). Vector xq
contains the coordinates of the query points.
If you have multiple sets of data that are sampled at the same point coordinates, then you can pass v
as an array. Each column of array v
contains a different set of 1-D sample values.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.