Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3280858
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:45:05+00:00 2026-05-17T19:45:05+00:00

I haven’t used MATLAB in a while so i can’t figure out what I’m

  • 0

I haven’t used MATLAB in a while so i can’t figure out what I’m doing wrong here.

I want to plot (on one graph) curves for 4 different Temperatures. V should be on the x-axis and P should be on the y-axis.

What I have after the % is just a reminder for me and has nothing to do with what I’m doing in the plot.

Here’s what I have in my editor:

a=3.7E-7;
b=4.3E-5;
R=8.314E-6;
n=1;

V1_vector=zeros(1,25);
P1_vector=zeros(1,25);
T1=400; 
V1=.0000823;
for n=1:1:25
    P1=((R*T1)/(V1-b))-(a/(V1.^2));
    V1_vector(n)=V1;
    P1_vector(n)=P1;
    V1=V1+.001324708;     %V1=0.0332
    n=n+1;
end   
P1=P1_vector;
V1=V1_vector;

V2_vector=zeros(1,25);
P2_vector=zeros(1,25);
T2=350; 
V2=.00007133;
for n=1:1:25
    P2=((R*T2)/(V2-b))-(a/(V2.^2));
    V2_vector(n)=V2;
    P2_vector(n)=P2;
    V2=V2+.0011579468;     %V2=0.02902
    n=n+1;
end   
P2=P2_vector;
V2=V2_vector;

V3_vector=zeros(1,25);
P3_vector=zeros(1,25);
T3=300; 
V3=.00006347;
for n=1:1:25
    P3=((R*T3)/(V3-b))-(a/(V3.^2));
    V3_vector(n)=V3;
    P3_vector(n)=P3;
    V3=V3+.0009906612;     %V3=0.02483
    n=n+1;
end   
P3=P3_vector;
V3=V3_vector;

V4_vector=zeros(1,25);
P4_vector=zeros(1,25);
T4=250; 
V4=.0000577453;
for n=1:1:25
    P4=((R*T4)/(V4-b))-(a/(V4.^2));
    V4_vector(n)=V4;
    P4_vector(n)=P4;
    V4=V4+.000825690188;    %V4=0.0207
    n=n+1;
end   
P4=P4_vector;
V4=V4_vector;

PLOT(V1,P1,V2,P2,V3,P3,V4,P4)

This is the error message

??? Attempt to execute SCRIPT Plot as a function:
C:\Users\amy\Documents\MATLAB\Plot.m

Error in ==> Plot at 73
PLOT(V1,P1,V2,P2,V3,P3,V4,P4) 

Please help me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:45:06+00:00Added an answer on May 17, 2026 at 7:45 pm

    If you are wanting to plot the points (V1, P1), (V2, P2), etc, put the points in a vector before plotting them. Try plot([V1, V2, V3, V4],[P1, P2, P3, P4]).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Haven't seen anything about it here but it seems to solve one of the
Haven't used C++ in a while. I've been depending on my Java compiler to
Haven't been able to find a definite answer. I know that one button can
Haven't been able to find this one out. How are Bitmaps stored in memory
I haven't started coding yet. I'm trying to figure out which libraries that is
I haven't used the STL much before, but I started to on this huffman
I haven't used ARC yet other than to deal with it when it forces
I haven't used multithreading in Clojure at all so am unsure where to start.
I haven't found a coherent answer to my quesion here :( My server's ISP
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.