Azzera filtri
Azzera filtri

Why is it showing Matrix dimensions must agree and how do i fix this?

1 visualizzazione (ultimi 30 giorni)
It shows this while i try to implement a while loop. I want the loop to keep repeating until user types the correct variable as written earlier.

Risposta accettata

Walter Roberson
Walter Roberson il 14 Apr 2018
Do not use = or ~= to compare character vectors. Use strcmp() instead.
(With R2016b or later, you can use = and ~= to compare string objects, but you are not using string objects.)
Reminder: we cannot copy and paste a screen snapshot to test with, especially when the screen snapshot cuts off the code.
  3 Commenti

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by