Filter löschen
Filter löschen

How to write if statement?

2 Ansichten (letzte 30 Tage)
Anne Nguyen
Anne Nguyen am 6 Okt. 2019
Kommentiert: Walter Roberson am 6 Okt. 2019
How do I write an if statement saying if either input is a matrix, my program should throw a unique error message? (I cannot use isvector function, I think I am supposed to use length() or size() functions if that is possible). Thank you!
  1 Kommentar
Walter Roberson
Walter Roberson am 6 Okt. 2019
How do you define matrix for this purpose? Which of these are a matrix ?
zeros(0,0)
zeros(0,1)
zeros(0,10)
zeros(1,0)
zeros(1,1)
zeros(1,10)
zeros(10,10)
zeros(0,0,0)
zeros(0,10,10)
zeros(10,0,10)
zeros(10,10,0)
zeros(1,10,10)
zeros(10,1,10)
zeros(10,10,1)
zeros(10,10,10)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by