a=[1 2 3;4 5 6]
i should compare b with all elements of a and to find the corresponding position in a ... e.g., the answer should be (1,2). what command or what method should i use
Direct link to this answer:
try this way
a=[1 2 3;4 5 6]; b=2;
Direct link to this comment:
I wouldn't call it x,y - I'd call it row, column. Because usually x is the column (horizontal location), not the row as you have it.
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
New to MATLAB?
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a location from the following list:
See all countries