What is wrong with this expression, why is it not solving?? Error in line 7

dH = (-600.351-247.184+917.475)*1000;
dS = 232.7+76.87-172.1;
dV = (11.248-24.630)/10;
R = 8.314
f = [0.5268, 10.26, 0.60685, 0.7626, 1.0374, 1.441]
T = [623.15, 673.15, 723.15, 773.15, 823.15]
P = ( -(R)*(T)*(log(f)) + T*dS - dH + dV) / dV %%error here!! help!!

Answers (1)

P = ( -(R).*(T).*(log(f)) + T.*dS - dH + dV) ./ dV

2 Comments

f is 6 elements, but T is only 5 elements. Hence the error. You can't combine them in an equation like you are attempting if they are not the same size.

This question is closed.

Asked:

on 23 Sep 2015

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!