Respondida
Concatenating elements of vectros without loops
x = [1 2 3]; y = [5 10]; [xx,yy] = meshgrid(x,y); z = [xx(:) yy(:)]

más de 4 años hace | 0

| aceptada

Respondida
Arrayfun with multiple variable?
Two inputs: A=arrayfun(@(x,y)functionExample(x,y), input1, input2); Three inputs: A=arrayfun(@(x,y,z)functionExampl...

más de 4 años hace | 0

Respondida
angle and abs function gives me 'Subscript indices must either be real positive integers or logicals.' error
Do you have a variable called abs? To find out, do: whos abs If there is one, clear it by doing: clear abs This will clear t...

más de 4 años hace | 1

Respondida
Unrecognized function or variable
If the intent is that the local functions defined in the scripts accc.m and comple.m (those local functions being acav, sigmap, ...

más de 4 años hace | 0

| aceptada

Respondida
Output cell values and column number for matrix with specific values
A = [1 128 1 0 0 0 0 0 0 0 0 0 0 1 129 0 1 1 1 0 1 1 0 0 0 1 1 130 1 0 1 0 0 0 0 1 0 0 0 1 149 0 0 0 0 1 0 1 1...

más de 4 años hace | 0

Respondida
How to put array in a cell of different groups ?
A = [ 70; 63; 105; 95; 128; 123; 137; 132; 142; 143; 154; 154; 160; 143 ]; B_wanted = { [ 70; 63 ] [ 105; 95 ] [ 128; 123 ] [ ...

más de 4 años hace | 0

| aceptada

Respondida
How to run randperm command for 100 times and store these permutations
To save each permutation, assign it to a row or column of k, instead of overwriting k each time. You've set up k to have 10 row...

más de 4 años hace | 0

| aceptada

Respondida
Connect points in two added variable plots of linear regressions
Use the output from plotAdded, which is the plotted lines. Get the first line's (data line) XData and YData for each model, and ...

más de 4 años hace | 0

| aceptada

Respondida
Help plotting user input functions for Matlab App.
The reason using 'x' works is because 'x' is a valid line marker, so MATLAB plots x = -10:0.1:10 against its indices, 1:201 (not...

más de 4 años hace | 1

| aceptada

Respondida
how should i fix the problem :Index exceeds the number of array elements (4).
I don't get that error (or any other errors) when I run it: clear;clc; im=imread('unnamed.jpg'); im_1 = double(im); R=im_1(:...

más de 4 años hace | 0

Respondida
Interpolating a set of values
The problem is that xlsread returns a matrix with some NaNs since the data columns in the xlsx file do not all have the same amo...

más de 4 años hace | 1

Respondida
scroll bar does not work when dialog box appears in app designer
inputdlg creates a modal dialog box. "Modal" means that no other window can be interacted with while the modal window is up. To...

más de 4 años hace | 0

| aceptada

Respondida
graph did not plot, how to plot ?
When I call the function, it plots: % call the function vdpd_qo_syn: vdpd_qo_syn() % define the function vdpd_qo_syn: functi...

más de 4 años hace | 0

Respondida
2 sets of x,y variables, one changing loop, one set, how to plot them and update plot to have both
Setting the XData and YData of the line that should change is perfectly good way to update what needs updating (and avoid updati...

más de 4 años hace | 1

| aceptada

Respondida
Comparing Strings and Finding Differencies
Your calculation of the positions of mutations pos_mut is ok, but it should be done only after result is completely determined; ...

más de 4 años hace | 1

| aceptada

Respondida
I have data in seconds of each year, how to make continuous data for few years to plot as variable (Vx, Vy) Vs year
data = readmatrix('Ask.txt'); t = datetime(data(:,1),1,1) + seconds(data(:,2)); disp(t); % big jump from 01-Jan-2009 06:20:00 ...

más de 4 años hace | 1

Respondida
How to remove extra value from histogram In MATLAB
You can't change the 'Values' property of a histogram directly, but you can change its underlying 'Data'. In this case, you can ...

más de 4 años hace | 0

Respondida
while writing txt file variables/data are shown in one column instead of being different column
When you fprintf a matrix, MATLAB prints the elements in order of: first column first, followed by the second column, and so on:...

más de 4 años hace | 0

Respondida
Sorting the vector y wrt the vector x?
x = [ 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.66 ]; y = [ 0...

más de 4 años hace | 1

| aceptada

Respondida
How te delete certain coulmns from a table with respect to the header
I'm unable to create a table with more than one column called 'AA' AA = [1; 3; 4; 0]; B = [1; 0; 5; 2]; table(AA,B,AA) So I'...

más de 4 años hace | 0

Respondida
I am graphing a function, and it is graphing more sin/cos waves then it is supposed to
Use cosd and sind when the angle is in degrees. cos and sin are for when the angle is in radians. theta = 0:180; L = 1; x = L...

más de 4 años hace | 0

| aceptada

Respondida
How to move quiver arrows within the semi-circle
It's not clear how you determine where the quivers start, i.e., where the 'base' of each one (not the arrow end - the other end)...

más de 4 años hace | 0

| aceptada

Respondida
How to insert values in a zeros matrix?
all_lat = -89.75:0.25:90; % according to the longitudes specified for India (66.5 to 100), % longitude goes from -180 to 180,...

más de 4 años hace | 0

Respondida
How to make time string from seconds of each year (total 11 years) to year (for 11 years)
dt = datetime('2008-01-01 00:00:00'):minutes(5):datetime('2019-12-31 23:55:00'); dt(1:10).' dt(end-9:end).'

más de 4 años hace | 1

| aceptada

Respondida
my code is getting the sum of all the numbers under the positive numbers and not letting the negative numbers get summed separately.
Notice that you are checking whether n, the number of numbers, is positive or negative: if n > 0 positive_num = positive_n...

más de 4 años hace | 0

Respondida
Creating an array for a set number iterations
F = 100000; for i = 1:30 Ct = F*0.04.*ones(i,1); Ct(i) = Ct(i)+F end

más de 4 años hace | 0

| aceptada

Respondida
extracting the location of the two largest peaks
% some signal Y Y = sin(0:0.01:12*pi); Y = Y+0.2*randn(size(Y)); plot(Y) [pks,locs] = findpeaks(Y); [pki,loci] = maxk(pks...

más de 4 años hace | 0

| aceptada

Respondida
Why is my 'n' only 1?
My guess is that this line: peak_CADO_DPCPX = min(new_files(:,peak_point_B)); % peak_point_B for all files should be this: pe...

más de 4 años hace | 0

Respondida
How can I plot this figure?
You could use create patch objects instead of rectangle objects, and then make a legend from (some of) those patches. Or you ca...

más de 4 años hace | 0

| aceptada

Respondida
Colormap map to Y axis instead of Z
You can use the fourth input to surf to set the color to something other than Z. In this case set the color to be the same as Y:...

más de 4 años hace | 0

| aceptada

Cargar más