Réponse apportée
Slider in Matlab code
The labels (i.e., the 'text'-stlye uicontrols) have the strings you are passing to findobj, not the sliders, so findobj returns ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Update slider Limits after loading data?
MATLAB doesn't appear to allow the Limits property of a uislider to take on int32 values, at least in R2016b. So it's worth a s...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Why is the lamp color and label not changing according to the if statement?
The lamp and label change inside a while loop. To see the changes as the code runs, you need to add drawnow after setting their ...

plus de 2 ans il y a | 0

Réponse apportée
Create megred files via a for loop
"I would like to create one merged file after each Iteration" If by "merged file" you mean a file containing the contents of al...

plus de 2 ans il y a | 0

Réponse apportée
How can I convert cell array to an arrary matrix?
@Abdullah Türk: If you know that all the cells of your cell array contain column vectors of the same class (as is the case in th...

plus de 2 ans il y a | 1

Réponse apportée
What is the best way to add empty rows to an existing table, to pre-allocate for more data?
T = table(["One"; "Two"; "Three"], [1; 2; 3], ['the'; 'cat'; 'sat'], {{1 2 3}; {4 5 6}; {7 8 9}}) T{end+100,1} = missing % add ...

plus de 2 ans il y a | 1

Réponse apportée
maknig tab delimited files
% create F, a 95x20000 cell array with column 1 and row 1 containing % character vectors and the rest containing scalar numeric...

plus de 2 ans il y a | 0

Réponse apportée
How do I return the indexed values unsorted, in the original order in which they appear in a vector?
radius_gl = [75 15 25 % col_1 = G; col_2 = L; col_3 = radii; 77 17 25 79 19 50 81 21 50 83 23 75 85 25 75 87 27 100 89 2...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
too many input arguments in my code
The reason for the error "Too many input arguments" while evaluating the callbacks is that MATLAB always provides the first two ...

plus de 2 ans il y a | 0

Réponse apportée
3d mesh from vector points
unzip('formica 50x.asc.zip') M = readmatrix('formica 50x.asc','FileType','text','Delimiter','\t'); % the file contains two s...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Need help with changing UIaxis scatter plot colors
You need to set the scatter plot 'MarkerFaceColor' to 'flat' at some point, for the custom CData to take effect. For example, yo...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
assigning values in color bar
min_val = 17; max_val = 27; N = max_val-min_val+1; t = linspace(0,1,N); % tick locations (0, 0.1, 0.2, ...,...

plus de 2 ans il y a | 1

Réponse apportée
Superimpose several images in one axes by enabling checkboxes in GUI
It sounds like you could create an image object in the axes for each of the fields in the Image structure, and set the checkboxe...

plus de 2 ans il y a | 0

Réponse apportée
Indexing the row number for a max value in a column in a cell array, and then making a new vector populated by that same row number but in another column in that cell array.
You can use the second output of max(), which tells you the index of the (first instance of the) maximum value. Here I'm storin...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Save each result in different folders by their names
Say m and p are 1: m = 1; p = 1; Then OO is this: OO= [' ' num2str(m) '' num2str(p) ' '] And the file name you construct to...

plus de 2 ans il y a | 0

Réponse apportée
How to make tiled images larger
One thing you can try is to experiment with different TileSpacing values: https://www.mathworks.com/help/matlab/ref/tiledlayout...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Trouble saving image to tif format
This is mentioned in the documentation for imshow, in a Note under the DisplayRange input argument section: "If you call imshow...

plus de 2 ans il y a | 0

Réponse apportée
How to put a sequence of text values in one function?
There is no need to use "text form". Simply pass the values stored in the cell array set (which I'll call C to avoid confusion w...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
can somebody help me,how can i plot all datenum on X axis,i hope i can plot all the date (1,2,3,...) not only some date(1,5,9,...)
You can set the xticks. % a guess at some variable values: freq = 1000; t1 = linspace(92,121,1000); Hdiff = rand(1,1000); t...

plus de 2 ans il y a | 0

Réponse apportée
How to get the index of a number in a cell-array including empty cells
Without cellfun or loops? No. A simple line? Yes. C = {4,[],6,6}; ind = cellfun(@(x)isequal(x,6),C)

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Add new line in middle of line of a text file
unzip('Sections.zip') % subdir = 'TCLFiles'; subdir = ''; oldfilename = fullfile(pwd,subdir,'Sections.tcl'); newfilename =...

plus de 2 ans il y a | 0

Réponse apportée
The calculation of tardiness for each part i am getting is wrong and the bar graph legend are not right plus total tardiness for batch is coming wrong.
print1scheduling() function print1scheduling() % User input for FDM printer parameters buildEnvelope = [250, 250,...

plus de 2 ans il y a | 0

Réponse apportée
How to change the graph type
Maybe fill along with boundary. num_simulations = 10000; %Common parameters Discount_Rate_min = 0.06; % assume 6-8% Di...

plus de 2 ans il y a | 0

Réponse apportée
for loop with multiple indices
case_count = 0; for Hs=Hs_start:Hs_end environment.WaveTrainHs = Hs; for Tp=Tp_start:Tp_end environment.Wave...

plus de 2 ans il y a | 0

Réponse apportée
How to make a two line complex plot title
% using these since I don't want to make uicontrols: handles_editSampleID_String = '45'; handles_editL_String = '0.00002'; % ...

plus de 2 ans il y a | 0

Réponse apportée
save work space variables into excel sheet headlines and columns
One way to write the file: C = [Results_Names; num2cell(Results_Values)]; writecell(C,filename) Another way to write the file...

plus de 2 ans il y a | 0

Réponse apportée
Editing tick marks figure
xlim([0 200000]) xt=0:30000:150000; xtl=compose('%d',xt); PERC = [45000 100000 130000]; % say xt=[xt PERC]; xtl=[xtl ...

plus de 2 ans il y a | 0

Réponse apportée
matrix calculation reshaping and diferences between datum
You probably want delta_lat_Dlx = lat_dec - lat_3_DLx.'; or delta_lat_Dlx = lat_dec.' - lat_3_DLx;

plus de 2 ans il y a | 0

Réponse apportée
Retain rows and columns depending on the values of an array
A = [3 5 7 1 2; 2 4 3 1 5; 2 6 1 6 6; 4 7 5 1 1; 2 0 1 5 2]; B = [1, 3, 5]; A = A(B,B) (The example suggests B is [1 3 5], ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How to create a table using fprintf, and use data from a for loop that uses stepinfo?
clc, clear, close all % OPEN LOOP num = {1}; den = {[1 7 10 0]}; Gs = tf(num,den) output = step(Gs); figure(1) stepp...

plus de 2 ans il y a | 0

Charger plus