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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:18:21+00:00 2026-05-27T02:18:21+00:00

I’m a beginner in MATLAB and hope someone can help me with this problem.

  • 0

I’m a beginner in MATLAB and hope someone can help me with this problem.

The GUI I created produce ‘G’ corresponding to user’s frequency and amplitude inputs. For ex. freq=[2 3 7]; AMPL=[2 3 4], the G produced is

7.8214    5.0132    1.7297
6.8302    4.3406    1.4855
6.3412    4.0536    1.3403

As a second ex. if user inputs,freq=[2 3] and AMPL=[3 4]; the G produced is

[6.9020    4.3621;
6.2893    4.0276]

Thus G can be of any size depending on the no. of freq and AMPL input. Min. size of G is [1 1] ie a single number and max. size it can be of [6 6];
what I want to do is to intoduce a pushbutton(save_G) in my GUI,which will save the G generated in another variable(lets say G5). thus once a user input a specific freq and AMPL and generate G, that G should save on G5 once the user enter save_G pushbutton. and again if the user inputs other values for freq and AMPL and generated a new G,this new G should add on to the G5(if user presses the save_G5 button).How do I store the old G value and append the new G value to the G5 on hitting the pushbutton? thus I want my G5 should look like as follows for the above examples.

G5=
freq(1)=[2 3 7]; AMPL(1)=[2 3 4];
G(1)=
7.8214    5.0132    1.7297
6.8302    4.3406    1.4855
6.3412    4.0536    1.3403

freq(2)=[2 3] ;AMPL(2)=[3 4];
G(2)=
6.9020    4.3621
6.2893    4.0276

Thus G5 should keep on saving Gs and have to be sorted in the ascending order of the first element of frequencies.

How can I achieve this? Looking forward for someone’s help. assistance will be highly appreciated.

  • 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-27T02:18:22+00:00Added an answer on May 27, 2026 at 2:18 am

    As far as I undersand your point, I think you should use a cell.

    At the beginning of the program you initialize G5 to en empty cell:

    G5={};
    

    and each time the user press a button, you should append the new G to G5:

    G5=[G5 G];
    

    for more information about cells, if you are a beginner:

    http://www.mathworks.fr/help/techdoc/matlab_prog/br04bw6-98.html#br04bw6-117

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but

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.