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 8432813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:13:17+00:00 2026-06-10T06:13:17+00:00

Trying to engineer the following in Matlab: ** loop start; y(:,i) = function of

  • 0

Trying to engineer the following in Matlab:

** loop start;
   y(:,i) = function of x;
   z(:,i) = function of x;
   plot(x,y(:,i))   on figure 1, hold all;
   plot(x,z(:,i))   on figure 2, hold all;
** loop end;
   add title, legend, etc for figure 1 (NB: we have multiple lines);
   add title, legend, ets for figure 2 (NB: same, have multiple lines for the legend);`

Tried multiple combinations without much luck. Managed to get 2 figures but only the 2-nd displays multiple lines, not the first. And can’t figure how to add legends to these 2 correctly.

  • 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-06-10T06:13:18+00:00Added an answer on June 10, 2026 at 6:13 am

    Save a handle to each figure, and to each axis object:

    fh1 = figure;
    hold all;
    ah1 = gca;
    
    fh2 = figure;
    hold all;
    ah2 = gca;
    
    for i=1:N
        y(:,i) = function of x;
        z(:,i) = function of x;
        plot(ah1, x, y(:,i)); %# tell it which axis to use (ah1)
        plot(ah2, x, z(:,i)); %# (ah2)
    end
    
    legend(ah1, ...) %# legend options here
    legend(ah2, ...) %# and the other legend
    
    %# note: you can set figure properties for each using fh1, fh2 handles.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to reverse engineer (OllyDbg) an application (game) that disables (captures/intercepts/blocks) all global
I'm trying to reverse engineer a function over which i have no source, and
I'm trying to learn how to reverse engineer software and all the tricks to
I'm trying to reverse engineer how facebook handles their notifications, where when you get
I'm learning assembly, motivation being able to reverse engineer . I'm trying to find
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
I am trying to figure out how to correctly and efficiently unit test my
i was trying to reverse engineer a website ( www.asklaila.com ) to find out
I am trying to reverse engineer the build system of a commercial Windows based

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.