Effacer les filtres
Effacer les filtres

Matlab Error (Z must be a matrix, not a scalar or vector.)?

1 vue (au cours des 30 derniers jours)
Zach Russell
Zach Russell le 7 Nov 2023
Modifié(e) : KSSV le 7 Nov 2023
P_air = .1:.1:4;
alpha = .0125:.0125:.5;
[X,Y] = meshgrid(alpha,P_air);
T_air_dry = (1/0.0408)*log((0.42*P_air.*(1-alpha))./(0.03043+(0.00714*(1-alpha))));
Z = T_air_dry;
mesh(X,Y,Z)
grid on
hold on
%I keep getting the "Z must be a matrix, not a scalar or vector" error.
%Thank you for the help

Réponse acceptée

KSSV
KSSV le 7 Nov 2023
Modifié(e) : KSSV le 7 Nov 2023
P_air = .1:.1:4;
alpha = .0125:.0125:.5;
[alpha,P_air] = meshgrid(alpha,P_air);
T_air_dry = (1/0.0408)*log((0.42*P_air.*(1-alpha))./(0.03043+(0.00714*(1-alpha))));
Z = T_air_dry;
mesh(alpha,P_air,Z) % use surf
grid on
hold on

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by