Using value stored in a matrix in a prompt.

1 view (last 30 days)
disp('Is there a member between Node [%d %d %d]' Node(i,1) Node(i,2) Node(i,3) 'and the node [%d %d %d]' Node(j,1) Node(j,2) Node(j,3) '[Y/N]?\n');
In the above line of code, I want to display coordinates of the nodes before showing an input prompt to user. The coordinates of the respective nodes are present in the matrix "Node". I have used the above code but it prints [%d %d %d] as it is. How to show the coordinates in the message? How to reframe the above line of code?

Accepted Answer

madhan ravi
madhan ravi on 30 Jun 2020
doc sprintf

More Answers (0)

Community Treasure Hunt

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

Start Hunting!