Respondida
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 ...

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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 ...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 1

Respondida
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 ...

más de 2 años hace | 1

Respondida
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...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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 ...

más de 2 años hace | 0

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

más de 2 años hace | 1

| aceptada

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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, ...,...

más de 2 años hace | 1

Respondida
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...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

Respondida
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)

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 0

Respondida
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,...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

Respondida
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'; % ...

más de 2 años hace | 0

Respondida
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...

más de 2 años hace | 0

Respondida
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 ...

más de 2 años hace | 0

Respondida
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;

más de 2 años hace | 0

Respondida
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], ...

más de 2 años hace | 0

| aceptada

Respondida
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...

más de 2 años hace | 0

Cargar más