I have the following formula or equation and i wanted to show the effect of mass while keeping the other variable constant , How can i plot different graph by only changing the mass in one figure
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
assegid belay
el 3 de Mzo. de 2021
Respondida: Bjorn Gustavsson
el 3 de Mzo. de 2021
p_reg=η(inv ) η(m ) ZGB (k1 v+k2 v^3+Mv dv/dt)
0 comentarios
Respuesta aceptada
Bjorn Gustavsson
el 3 de Mzo. de 2021
If I interpret your equation as "you have a function ZGB that depends on k1, v+k2, v^3+M*v and dv/dt" then it will very much depend on how that function depend on the different inputs. If only M varies it is rather simple:
eta_inv = 12; % You'll know
eta_m = 23; % what to set here
M = 0:34;
k1 = 45;
v = exp(-pi);
k2 = sqrt(2);
dvdt = 17;
plot(M,eta_inv*eta_m*ZGB(k1,v+k2,v^3+M*v,dvdt))
If one or more of the other parameters also varies things become more complicated. Lets say that k1 also varies:
k1 = 3:11;
for i1 = numel(M):-1:1
ph_M(i1) = plot(k1,eta_inv*eta_m*ZGB(k1,v+k2,v^3+M(i1)*v,dvdt))
hold on
end
This might be permuted in as many combinations as you have varying parameters, so here you might also plot this way:
for i1 = numel(k):-1:1
ph_k(i2) = plot(M,eta_inv*eta_m*ZGB(k1(i1),v+k2,v^3+M*v,dvdt))
hold on
end
Same procedure repeats for additional varying parameters, the number of permutations will increase inconveniently. If you an use surf, pcolor or slice those might also be useful for collecting/combining multi-varying-plots.
HTH
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!