How to get array vector output in GUI?

조회 수: 13 (최근 30일)
AbuYusuf
AbuYusuf 2017년 6월 3일
Hi,
I have this function and I want to do a GUI for it. The only problem I am facing is U vector; how can I display the matrix U in GUI? should I use regular textbox or any other? Note that the size of U will be changing later depends on the size of x.
function [k,U]=test1(x)
format rat % change decimal into fractional numbers
for i=1:size(x,2)
[Num(i), Den(i)] = numden(sym(x(i))); % Num of simplest form of x
end
Max1 = max([Num(:);Den(:)]);
Min1 = min([Num(:);Den(:)]);
k = max(Max1, abs(Min1)); % get max of abs values of the two
Y = [1 5;3 4]; L = [1 k;1 1]; U = Y.*L;
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by