A simple code gives me an error, anyone help in this issue?
Show older comments
My function file is, function [ y ] = van( v ) y = (p + a./v.^2).*(v - b) - (r *t); end My script file is, >> r = 0.082; >> a = 3.6; >> b = 0.4; >> p = 1; >> t = 300; >> v = linspace(0,50); >> y = van(v) Undefined function or variable 'p'.
Error in van (line 4) y = (p+a./v.^2).*(v - b) - (r *t);
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!