How to put your own data into the GUI created from the "GUIDE App Containing Tables and Plots" example given by MathWorks?

1 visualización (últimos 30 días)
I am trying to insert four columns of data that represent the output from a DAC in voltage,decimal,binary, and hexadecimal forms/base. I want to simply replace the data given in the example with my data but when i do that I get an error saying "not enough input arguements." I am not certain how thats the case considering I actually have more inputs. (note: the given example input in a 288x2 double and I replaced that with my input which is a 100x4 cell)
Here is the code for my data:
clear all; clc;
decArr = [128,136,143,151,159,167,174,182,189,196, ...
202,209,215,220,226,231,235,239,243,246, ...
249,251,253,254,255,255,255,254,253,251, ...
249,246,243,239,235,231,226,220,215,209, ...
202,196,189,182,174,167,159,151,143,136, ...
128,119,112,104,96,88,81,73,66,59,53,46, ...
40,35,29,24,20,16,12,9,6,4,2,1,0,0,0,1,2, ...
4,6,9,12,16,20,24,29,35,40,46,53,59,66,73, ...
81,88,96,104,112,119];
x = decArr'; %decimal
y = round((x * (.019607843)),2);
%plot(x)
hexD = dec2hex(x);
binA = dec2bin(x);
m = strcat(string(binA(:,1:4)),string(" "),string(binA(:,5:8)));
Voltage = pad(strip(string(y)),'both');
Decimal = pad(strip(string(x)),'both');
Binary = strip(m);
Hexadecimal = strip(string(hexD));
vv = cellstr(Voltage);
xx = cellstr(Decimal);
yy = cellstr(Binary);
zz = cellstr(Hexadecimal);
Any advice would be great!

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by