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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:14:49+00:00 2026-06-15T14:14:49+00:00

In my project I use two classes – row and triangle. Class row in

  • 0

In my project I use two classes – row and triangle. Class row in its functions creates triangle class objects:

classdef row < handle

% some parameters here

methods

% constructor and some other functions here

function [T1 T2] = createFoR(obj, hT, Alpha, Beta, DeltaAlpha, DeltaBeta)
         % creating P1 matrix (irrelevant, its 100% correct)
         T1 = triangle(P1);
         % creating P2 matrix (irrelevant, its 100% correct)
         T2 = triangle(P2);
end

end

When I’m calling this row class function like this:

[T1 T2] = Row1.createFoR(T(1,1), Alpha, Beta, DeltaAlpha, DeltaBeta);

or like this:

[T(2,1) T2] = Row1.createFoR(T(1,1), Alpha, Beta, DeltaAlpha, DeltaBeta);

everything works perfectly fine. But when I attempt to assign both returned triangle objects to array cells like this:

[T(2,1) T(2,2)] = Row1.createFoR(T(1,1), Alpha, Beta, DeltaAlpha, DeltaBeta);

I get this error:

Error using triangle (line 10)
Not enough input arguments.

Error in test (line 20)
[T(2,1) T(2,2)] = Row1.createFoR(T(1,1), Alpha, Beta, DeltaAlpha, DeltaBeta);

May I kindly ask you to explain me what I’m doing wrong?

  • 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-15T14:14:50+00:00Added an answer on June 15, 2026 at 2:14 pm

    It looks like T is an object, where T(double,double) is a function/constructor. So in the case you point out

    [T(2,1) T(2,2)] = Row1.createFoR(T(1,1), Alpha, Beta, DeltaAlpha, DeltaBeta);
    

    You are actually calling T(double, double) three times, where the error occurs specifically in T(2,2), (where the code is 100% correct?).

    Updated from comment

    What is odd is the input argument error in triangle line 10. Could the problem be in P1, P2?

    You could also try the following – but its guesswork without something I can run/reproduce the problem (the error is in code not listed?)

    [T1 T2] = Row1.createFoR(T(1,1), Alpha, Beta, DeltaAlpha, DeltaBeta);
    T(2,1:2) = [T1, T2];
    

    Answer:

    Another thought is that when T(2,2) is filled its trying to construct T(1,2) with no arguments?

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

Sidebar

Related Questions

I have two classes, Phone.class and Time.class. I would like to use their methods
I use JPA and Hibernate for my project. I have two classes with same
I have two classes in two files in a class library project, they are:
I am requiring two classes from the PHPCassa project into my class. Before I
I have two select queries to use in my project for getting data and
My use case is this... I have a project that has two production branches.
in my project are two classes (mapViewcontroller and listViewcontroller) and on the mapView are
I've got two classes in my MVC project Order and Product . Because Product
Right now, my project has two classes and a main. Since the two classes
Given two classes, creating an object of each class in one another results in

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.