For a graph G=(V,E) and i,j∈V, denote by di, dj the degrees of vertices i, j in G. Let f(di,dj)>0 be a function symmetric in i and j. Define a matrix Af(G), called the weighted adjacency matrix of G, with the ij-entry Af(G)(i,j)=f(di,dj) if i∼j and Af(G)(i,j)=0 otherwise. In this paper, we find the extremal trees with the largest radius of Af when f(x,y) is increasing and convex in variable x. We also find the extremal tree with the smallest radius of Af when f(x,y) has a form P(x,y) or P(x,y), where P(x,y) is a symmetric polynomial with nonnegative coefficients and zero constant term. This paper tries to unify the spectral study of weighted adjacency matrices of graphs weighted by some topological indices.