Réponse apportée
Generate all possible permutations including repeats
F = [0,1,2]; n_values = numel(F); n_combos = n_values^n_values; M = F(1+dec2base(0:n_combos-1,n_values)-'0'); disp(M);

plus de 2 ans il y a | 0

Réponse apportée
generate all possible upper triangular matricies with variables
g = [1,NaN,NaN; 0,1,NaN; 0,0,1]; v = [0,1,2]; n_values = numel(v); slots = find(isnan(g)); n_slots = numel(slots); n_...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Ordering a matrix as x increases and y increases
square = unique(square,'rows'); works to remove repeated rows, yes. In I uderstand the ordering you want, it is to sort by y-co...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Keyboard Shortcut to move through the tabs in a Tab Group menu (Request to improve code)
That code can be simplified a bit: % Window key press function: UIFigure function kpf(app, event) if ~isequal(event.Mod...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
Problem substituting a for loop with vectorization
% just to have some values to run with: l1 = 1; l2 = 1; alfa1 = 0; alfa2 = 0; k1 = linspace(0,2*pi,360); k2 = linspace...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
call function with fewer parameters
"what happen if i call function with 1 parameter instead of 3" The answer depends on what the function does with the parameters...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
restructure data table based on date and other categorical variables
T = readtable('data_test.csv') T_summary = groupsummary(T,{'Site','Date'},@(x){x},{'d18O','Depth'}); T_summary = removevars(T_...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How I can split a two column data into chunks like this snap shot
S = load('Data_Chunking.mat'); A = S.Alg2_mLat_maxEE; C = 9; % chunk size [M,N] = size(A); % in case A is not an integ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Question about headerlines commend
Check why fopen in this line FID = fopen([DataFolder,'\',DataList(n)], 'r') returns -1 for FID. Better yet, use the second ou...

plus de 2 ans il y a | 0

Réponse apportée
Insert data to table
temps = table(datetime(rand(10,1),'ConvertFrom','datenum'),rand(10,1)) a_different_table = table([1;2;3;4;5]) start_row = 6; ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
duplicate tab:how know reference object?
Better than findobj() is to capture the output from copyobj(): new_obj = copyobj(obj,newtab);

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
tabs created in the tabgroup
numel(tg.Children) where tg is your tabgroup.

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
fprintf formatting problem with cell and array matrix 2
fracs = ... [1.080799513888714E-32 0 0.62466759170135333 0.0742119108820972 0 0 0 ... 0 0 0.30112049741654717; 8.1862...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
check if tab exist
"i want check if app.Tab_Instrum_Aggreg exist or not" isprop(app,'Tab_Instrum_Aggreg')

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
how to extract slider's value
You are storing the slider object in an array. hslide is the array, and hslide(i) is the slider. When you try to get the value, ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Clean data and extraction
T = readtable('data.xlsx'); T.Properties.VariableNames = num2cell(char(64+(1:size(T,2)))); % set H = G where H == 0 idx = T...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
problem with columnWidth..how solve it
It seems like you are confusing the table data object with the uitable graphics object. If you have a uitable (UIT) whose data ...

plus de 2 ans il y a | 0

Réponse apportée
Is there a property to reset timer
I think stop() then start(), like you've done, is the best way.

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to only fill one line of a matrix with a given formula
function A = specialMatrix(n) A = zeros(3,n); A(1,:) = 1; A(2,1:2:end) = 20; A(3,1:3:end) = 30; ...

plus de 2 ans il y a | 0

Réponse apportée
How to get all unique positions in a cell array?
c = num2cell(unique(vertcat(c{:}),'rows'),2);

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How do I identify elements in a table/matrix and sort them in descending order?
M = magic(5) % some matrix [v,idx] = sort(M(:),'descend'); [r,c] = ind2sub(size(M),idx); result = [r, c, v]

plus de 2 ans il y a | 1

Réponse apportée
How Do I Create a Mean Filtered Image using For Loops?
[gRow, gCol, ~] = size(grayImg); gRow and gCol are non-negative scalar integers. if mod(gRow, 3) < 3 mod(_,3) of something wi...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Interpolation on multiple data sets
Have you tried interpn? thrusts = 0.1:0.3:1; altitudes = 10000:1000:12000; mach_numbers = 0.25:0.1:0.75; [T,A,M] = ndgrid(...

plus de 2 ans il y a | 0

Réponse apportée
menu not showing elements in string array
menuOption = menu('Choose file.', savedFileNames{:}, 'Return to previous menu'); This passes the elements of savedFileNames as ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
extracting rows of data
inputFile = '07010000002.txt'; data = readmatrix(inputFile); figure hold on plot(data(:,1)) min_idx = find(islocalmin(d...

plus de 2 ans il y a | 1

Réponse apportée
How to iterate through a cell array and link elements in particle tracking?
This plots using only the "good" (i.e., non-zero) indices from Index_matrix{jj}. Note that three additional particle tracks are ...

plus de 2 ans il y a | 0

Réponse apportée
Given vector with N entries, generate all combinations with K entries such that K > N, vector entries can repeat
syms a b v = [a b]; n = numel(v); k = 4; result = v(dec2base(0:n^k-1,n)-'0'+1)

plus de 2 ans il y a | 0

Réponse apportée
Plotting piecewise function over two periods
t = 0:0.001:0.8; ih = zeros(size(t)); idx = t < pi/10; ih(idx) = 500*sin(10*t(idx)).^2; plot([t t+0.8],[ih ih])

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How do you plot a line on a function defined by colors?
img = imread('image.png'); imagesc(img) hold on contour(mean(img,3),'k')

plus de 2 ans il y a | 0

Réponse apportée
fprintf formatting problem with cell and array matrix
See the attached modified script and resulting .txt file. The file-writing section is reproduced here: prodNums = length(prodN...

plus de 2 ans il y a | 0

Charger plus