Respondida
How to plot a line with specific line slope ?
You have to decide where the plotted line segment should start and end. Here's one way you might do that, which is to plot the ...

alrededor de 4 años hace | 1

| aceptada

Respondida
Extract sub array from d-dimensional array given indices for each dimension
% random 4-D (4x8x5x10) array A: d_siz = [4 8 5 10]; A = randn(d_siz); size(A) % make the index vectors for each dimension ...

alrededor de 4 años hace | 1

Respondida
how to sum elements
GA_sum = sum(GA); GH_sum = sum(GH); % etc.

alrededor de 4 años hace | 1

Respondida
How can one display multiple Heatmaps in one figure on the same scale?
You can specify the ColorLimits of all three heatmaps after they are created. Here's a demonstration with some random data: fo...

alrededor de 4 años hace | 0

| aceptada

Respondida
converting MJD in UT1 to calender date
Convert 2017 January 00:00:00.5912977 to year,month,day,hour,,,,,,seconds, as requested: dt = datetime('2017 January 00:00:00.5...

alrededor de 4 años hace | 0

Respondida
How I convert matrix 8760x1 to 365x24
M = 1:8760; % some 8760x1 matrix M_new = reshape(M,365,[]) % reshape to 365x24

alrededor de 4 años hace | 1

| aceptada

Respondida
How to make a colour gradient with 60 lines on a graph
You can set the ColorOrder property of the axes to control the colors of the plotted lines, without having to specify each line'...

alrededor de 4 años hace | 1

| aceptada

Respondida
Incorrect dimensions for raising a matrix to a power
Check that your inputs to gaussh are all scalars, because it looks like all three input arguments to the function gaussh are exp...

alrededor de 4 años hace | 0

Respondida
How to find repeated values after decimal in array?
data = [ ... 868.1 567.1 413.1 1159.7 52.1 99.7 126.7 111.1 167.2 1322.2 ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Writting multiple files with fopen 'w'
Here's a function (get_unused_file_name) you can use for this purpose. It takes a file name and check if that file already exist...

alrededor de 4 años hace | 0

| aceptada

Respondida
I don't understand the condition from FOR row 16 to row 26. Can explain each row form if row to the end please.
Lines 16 through 26: for i=1:rows fprintf('('); for j=1:columns if j < columns fprintf("%.4f , ...

alrededor de 4 años hace | 1

| aceptada

Respondida
round to 2 decimal places but still have more than 2 decimal places when storing
"the stored value not storing 2 decimal places." If you mean the value written to file has more than 2 decimal places, that's b...

alrededor de 4 años hace | 1

| aceptada

Respondida
Find min and max datetime in table
T = table( ... [2;2;3;3], ... datetime({'05/20/22';'05/20/23';'04/12/99';'06/12/02'},'InputFormat','MM/dd/yy'), ... ...

alrededor de 4 años hace | 1

| aceptada

Respondida
sort the matrix by the order of the first row
A = [ ... 3 5 4 1 2 0.2 0.5 0.7 0.1 0.9 0.7 0.9 0.4 0.3 ...

alrededor de 4 años hace | 0

| aceptada

Respondida
ismember to filtered table
That's doing ismember with the names of the files. [a,b]=ismember('meta_data_mri.MRID','MRIdata.subjects') [a,b]=ismember('abb...

alrededor de 4 años hace | 0

Respondida
Can someone run this function and give the results as I have 2017 version and I believe there are some functions that work in latest versions
It appears to run ok in R2017b. I guess that means you have R2017a. Here's the result: openfig('untitled.fig'); If I had to g...

alrededor de 4 años hace | 0

| aceptada

Respondida
Deleting rows with an if Statement
Here's a way to delete rows of a matrix if two conditions are both met: x = magic(7) % delete rows of x where the value in col...

alrededor de 4 años hace | 0

| aceptada

Respondida
How do I use readtable to read in an Excel file whose first column has indenting that I want to preserve?
opts = detectImportOptions('test.xlsx'); opts.VariableOptions(1).WhitespaceRule = 'preserve'; Ex_MassProps = readtable('test...

alrededor de 4 años hace | 1

| aceptada

Respondida
function with text string input and excel file
warning off all get_car_info('Cars.xlsx','x') get_car_info('Cars.xlsx','y') get_car_info('Cars.xlsx','z') function out = g...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to set sample values to zero
Use x(x < threshold) = 0, where x is your signal and threshold is your noise amplitude. Or x(abs(x) < threshold) = 0, if you mea...

alrededor de 4 años hace | 0

Respondida
Non working while loop
The last line inside the while loop: x0 = x1 sets x0 to x1. Therefore, when the while condition is checked again (which happe...

alrededor de 4 años hace | 1

Respondida
why do i get "Array indices must be positive integers or logical values ?"
res_im = imresize(imgs{i}, 0.4); is before the i loop, so i is not defined, so MATLAB interprets that i as the imaginary un...

alrededor de 4 años hace | 0

Respondida
Error using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111) 'Value' must be a double scalar.
Try it without converting to string app.EditField.Value = Re; because if app.EditField is a NumericEditField, its Value is a n...

alrededor de 4 años hace | 0

Respondida
Can I use the Guide function of MATLAB to create GUI in Raspberry Pi?
Yes.

alrededor de 4 años hace | 0

Respondida
Convert digital numbers to datetime elements
If you make a datetime array from t2, you can use interp1 to interpolate. (Also, t1 has 1057 elements, so I'll remove the last ...

alrededor de 4 años hace | 1

| aceptada

Respondida
Find the corresponding value of y when x is a specific value?
Maybe this % a 3D array like yours M = [(230:598).' rand(369,1)]+reshape(0:5:130,[1 1 27]); size(M) % find the row of M(:,1,...

alrededor de 4 años hace | 1

| aceptada

Respondida
Why does the variable 'ans' cannot be change when setting a domain? For example: I wanted to change the variable 'ans' to 'xofZ' but it keep saying it failed.
If you want to modify the value of xofZ, e.g., by having it retain only the real solutions, you must assign to xofZ. When the v...

alrededor de 4 años hace | 0

| aceptada

Respondida
how do I flip ever column in a matrix without using the fliplr function?
n = randi([4,15]); n_mat = randi ( [1,100], n, n) n_mat_flipped = n_mat(:,end:-1:1)

alrededor de 4 años hace | 0

| aceptada

Respondida
how to save plots in a folder. named as figure1,Figure2,Figure3,Figure4?
files = dir('*.txt'); files = fullfile({files.folder},{files.name}); for ii = 1:numel(files) a=readmatrix(files{i...

alrededor de 4 años hace | 0

| aceptada

Respondida
Use for loop to compare each row value out of two separate arrays to create a filtered final array
Inside the for loop, use RollValue(i) and PitchValue(i) instead of RollValue and PitchValue, and also you'll need to assign to A...

alrededor de 4 años hace | 1

| aceptada

Cargar más