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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:57:48+00:00 2026-05-13T14:57:48+00:00

Maybe a very easy question, but I am already looking for hours on the

  • 0

Maybe a very easy question, but I am already looking for hours on the Internet for the answer but I cannot find it.

I have created the function below. In another m-file I want to use the matrix ‘actual_location’. However, it is not possible to use an individual cell of the matrix (i.e. actual_location(3,45) or actual_location(1,2)). When I try to use an individual cell, I get the following error : ??? Error using ==> Actual_Location
Too many input arguments.

Can anyone please tell me what I have to change, so that I can read individual cells of the matrix?

function [actual_location] = Actual_Location(~);  
actual_location=zeros(11,161);
for b=1:11  
   for t=1:161  
       actual_location(b,t) = (59/50)*(t-2-(b-1)*12)+1;   
       if actual_location(b,t) < 1  
           actual_location(b,t) =1;  
       end       
   end  
   actual_location(1,1)  
end
  • 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-13T14:57:48+00:00Added an answer on May 13, 2026 at 2:57 pm

    As you have defined it, the name in the m-file for the matrix written by your function Actual_Location is actual_location. However, when you call your function you can give the output any name you like. I presume that you are calling it like this, remembering that Matlab is a bit case-sensitive:

    actual_location = Actual_Location(arguments);
    

    You are just writing to confuse yourself. Use a name other than actual_location for the dummy argument in the function definition, and call the function to return to a variable with a more distinct name, something like this:

    output = Actual_Location(arguments);
    

    It appears that you may be expecting actual_location(1,1) to return element 1,1 of an array, whereas it is, probably, a function call with 2 input arguments.

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

Sidebar

Related Questions

it's a very easy question maybe, but i can't find any working plug in
This is supposedly a very easy question, but I just can't seem to find
Maybe this is a very easy question but i didn't figure it out. What
Maybe this is something very easy to do it but so far it's taking
Maybe its a very dumb question but I hope you can give me some
I have a similar question to this one : It's very easy in py-amqp/flopsy
Maybe it's just the way my mind works, but I have a very hard
Maybe I'm overlooking something, and hopefully this is done very easy. I have a
I am newbie to this and this may be very easy question but I
Maybe a very simple question. How can I put in this code <Query> <Where>

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.