Respondida
Please help to get answer of this particular problem, which I won't understood, If A=[1 12 15;3 16 20;5 24 25] what will be the value of 'a' if [a b]=size(A)?
A=[1 12 15;3 16 20;5 24 25]; [a b] = size(A); disp(a)

alrededor de 4 años hace | 1

| aceptada

Respondida
Random number generator help
rand gives you number(s) between 0 and 1, so with appropriate scaling and offsetting, you can use it to get number(s) from any g...

alrededor de 4 años hace | 0

| aceptada

Respondida
Colormap- specific values for each heatmap value
Your idea of replicating the same color a certain number of times to build a colormap is good. However, the number of times each...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to display data in textbox from a choosen name in listbox?
Something like this is what you're after: function listbox1_Callback(hObject, eventdata, handles) val = get(handles.listbox1...

alrededor de 4 años hace | 1

| aceptada

Respondida
legend for multiple plots
% some matrices: res540 = rand(6,15); res720 = 1+rand(6,15); res900 = 2+rand(6,15); res1080 = 3+rand(6,15); % store the l...

alrededor de 4 años hace | 0

| aceptada

Respondida
Readtable ignoring first X rows
You can specify 'NumHeaderLines',0 in your call to readtable: q_sectors = readtable('qualy_sectors.csv','NumHeaderLines',0) No...

alrededor de 4 años hace | 2

| aceptada

Respondida
reshape a cell array to be row major
Maybe storing the data in a table will end up being more convenient: t = readtable('log.txt') t(2,:) However, to get a cell a...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to find the heights and widths of two repetitive neighboring peaks?
One place to start might be findpeaks, perhaps with the NPeaks and/or MinPeakHeight arguments, possibly with a low-pass filter a...

alrededor de 4 años hace | 0

Respondida
How to get argument of complex exponential?
The "sampling time" is not small enough. It must be less than 1/(2*nu) - i.e., sampling rate greater than 2*nu - to avoid aliasi...

alrededor de 4 años hace | 0

| aceptada

Respondida
Error in pdm_experiment_eeg_only
MATLAB is case-sensitive, so try changing screen to Screen: framrate = Screen ('framerate',0);

alrededor de 4 años hace | 0

Respondida
matrix columns in matlab
A = 1:1000 Y = repmat(A.',1,1000)

alrededor de 4 años hace | 0

Respondida
How to change distance of xticks in 3d bar plot (using bar3) ?
july_mean = 20 + (50-20).*rand(24,1); june_mean = 20 + (50-20).*rand(24,1); may_mean = 20 + (50-20).*rand(24,1); dat = [may_m...

alrededor de 4 años hace | 0

| aceptada

Respondida
Cache values from loop (with differing lengths) to save in 1 variable / matrix
To handle vectors of different lengths, you can make time_to_event a cell array: time_to_event = cell(numel(files),1); for ii ...

alrededor de 4 años hace | 0

| aceptada

Respondida
How can I select the aerosol values from different size of matrix?
Note that A is [2 2] A = size([0 0; 1 1]) so size(A) is [1 2] size(A) So when you compare size(Out(dates).aerosol) with size...

alrededor de 4 años hace | 0

| aceptada

Respondida
Extraction of frequencies and there indices from FFT graph ( for DTMF Detection)
The second output from findpeaks is the location of the peaks, which are the indices in the input vector where the peaks occur. ...

alrededor de 4 años hace | 1

Respondida
ismember(a, b) function problem
ismember(a,b) tells you whether each element of a exists somewhere in b ismember([1 2 3 4 5],[2 4 6]) % 2 and 4 exist in [2 4 6...

alrededor de 4 años hace | 0

| aceptada

Respondida
The setting of the time series on the x-axis
Instead of using datenum x values, you can plot with datetime x values and then set the xticklabel format using xtickformat: % ...

alrededor de 4 años hace | 0

Respondida
error: invalid call to script
You are getting that error because you have a file called imadjust.m (located in /home/oo/), which is a script. Scripts take no ...

alrededor de 4 años hace | 1

Respondida
Delete a selected row in a uitable
Move this line to the OpeningFcn: set(handles.uitable4,'CellSelectionCallBack',@(h,e) set(h,'UserData',e)); Having that line i...

alrededor de 4 años hace | 1

| aceptada

Respondida
I want to represent a set of 2-D experimental data (1 x 10matrix) using a colorbar plot.
data = [0 10 15 0 10 17 0 17 30 0]; x_spacing = 30; y = 18; n = numel(data); p = patch( ... 'XData',x_spacing*([0;1...

alrededor de 4 años hace | 0

| aceptada

Respondida
Can the Code Profiler be used programmatically to profile an app in App Designer?
"Can I initiate the start and stop of the profiling programatically?" Yes. See the "action" input argument part of the document...

alrededor de 4 años hace | 0

| aceptada

Respondida
Solo plotea en 2D. Error al utilizar surf o scatter3 en 3D
You can rename your script view.m to another name that doesn't shadow a built-in function, or you can change the View property o...

alrededor de 4 años hace | 0

Respondida
Add image into figure outside of plot axes
If your axes limits are fixed, then you could make an image in the same axes, place it outside the axes limits and turn Clipping...

alrededor de 4 años hace | 0

| aceptada

Respondida
Find all rows that contain a specific value in a excel
This call to strcmp: strcmp(T.Product, 'String', item) has an extraneous 2nd argument 'String'. It should be: strcmp(T.Produc...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to replace columns in a datafile after performing mathematical operations to them?
x=5; % a constant y=7; %another constant a = readmatrix('file1.txt'); disp(a) new_a = a; new_a(:,1) = new_a(:,1)/x; new_...

alrededor de 4 años hace | 0

| aceptada

Respondida
creating one legend for all data
c and d (the variables returned from boxplot) are matrices of handles to the lines created by boxplot. In legend, you can specif...

alrededor de 4 años hace | 1

Respondida
how to extract pixels from a image {black and white only }
data = imbinarize(rgb2gray(imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/160786/image.jpeg'))); % 1....

alrededor de 4 años hace | 0

Respondida
[Error: Function definition not supported in this context. Create functions in code file
To get past that particular error, move all the function definitions to the bottom of the script. I've done this for the m-file...

alrededor de 4 años hace | 2

| aceptada

Respondida
"Column Vector" XTick labels
plot(0:2,2-(0:2),'*') xticks([0 1 2]) xticklabels(sprintfc('%d\\newline%d',[0 2 1 1 2 0]))

alrededor de 4 años hace | 1

| aceptada

Respondida
How can I un-nest a cell array of different type cells?
C = {{'X';'X';'X'} [1;2;3] {'Y';'Y';'Y'} [1;2;3] {'Z';'Z';'Z'} [1;2;3]} % your cell array T = table(C{:}) % make a table T wri...

alrededor de 4 años hace | 1

| aceptada

Cargar más