How do I return the value of a matrix that will be changed by user when use 'openvar' to the variable followed

1 view (last 30 days)
Here is my piece of code,
clear
clc
display ('Enter your n1');
n1 = input('Enter your n1: ');
display ('Enter your n2');
n2 = input('Enter your n2: ');
A = zeros(n1+n2, n1+n2);
openvar 'A';
x = sum (A,1);
k_out_h = sum (A,2);
k_in_h = x';
k_in_eh = real(k_in_h);
k_in_ch = imag(k_in_h);
k_out_eh = real(k_out_h);
k_out_ch = imag(k_out_h);
a = size(A);
y = a(:,1);
b = [1:y];
c = b';
F = [c, k_in_h, k_in_eh, k_in_ch, k_out_h, k_out_eh, k_out_ch];
disp(F);
I want to calculate the node degree of a adjacency matrix that is specified by user, and display it in workspace.

Answers (1)

Wentao Zhu
Wentao Zhu on 26 Nov 2014
Now I am aware of the fact that I should wait for a user input (e.g. msgbox or wait for a keypress), or use an = ActiveX-plugin and your own GUI. Does any one have a idea how to implement either of those? Many thanks.

Categories

Find more on Search Path in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!