MATLAB Answers

0

How can I make a variable that is a matrix correctly output another matrix in a symbolic function?

Asked by Jacob DeBellis on 18 Sep 2019 at 4:00
I ahve two 1x300 matrix variables that i need to plug into a function , but every time I solve it I end up with a 0x1 matrix. How can i fix this issue? I was also wondering if a for loop is more suitable for solving it. This is my code so far. Thank you
clear('all'),clc
p_rng = logspace(-2,2,300); % [MPa] pressure (p) range
t_rng = 273.15+linspace(1,800,300); % [K] temperature (T) range
a=40100;
b=1.60;
R=10.73159;
syms V
eqn1= p_rng==((R*t_rng)/(V-b))-((a)/((V*(V+b))+(b*(V-b))));
V=solve(eqn1,V);

  0 Comments

Sign in to comment.

0 Answers