create a function of t in terms of p in matlab

Assuming you have a relationship between t and p, you can define your function in Matlab as follows:

function t = t_of_p(p)
    % Define relationship between t and p
    % Example: t = 2*p + 10
    t = 2*p + 10; % replace with your own function
end
148 chars
6 lines

This defines a function t_of_p that takes input p and returns the corresponding t value calculated using the relationship defined within the function. You can modify the relationship between t and p to suit your specific use case.

related categories

gistlibby LogSnag