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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:55:33+00:00 2026-05-11T11:55:33+00:00

In my matlab program, I want to determine whether a variable or output of

  • 0

In my matlab program, I want to determine whether a variable or output of a function is empty or not, before going further.

Actually, I’ve written a function which calculates an intersection point between two line segments. if there is no intersection, the function returns nothing (so the variable assigned by the function will be empty matrix).

I know I could use size function but is there any better way to do that?

  • 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. 2026-05-11T11:55:34+00:00Added an answer on May 11, 2026 at 11:55 am

    You can use isempty. For instance:

    >> isempty([])  ans =      1  >> isempty([42])  ans =      0 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a matlab function to initiate a program at a preset time? for
Is there an open-source alternative to MATLAB's fmincon function for constrained linear optimization? I'm
I actually have 2 queries: How do I display the data of a variable
I'm writing a MATLAB program that reads in a title from the user to
I have a MATLAB program that graphs some things and then outputs the graph
I have a Matlab program that generates a list x = 6.1692 8.1863 5.8092
I have several lists in Matlab that I want to write to the same
In a pylab program (which could probably be a matlab program as well) I
Is there any way to stop the execution of a matlab program from the
I want to use two MATLAB sessions on the same machine to run two

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.