Respondida
Why am I getting error "Vectors must be the same length" although they are of same length?
load('subject_data.mat') disp(subject_data) % There are 2 Trial40's in the table: find(subject_data.trialname == 'Trial40') ...

alrededor de 4 años hace | 1

| aceptada

Respondida
Using if-else statement to determine which value to input into function
t = max(samplegrades(:,2),samplegrades(:,3)) The if doesn't work as you expect because, when using an array condition in an if ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Can't get matlab to run a .exe file...
Try putting double-quotes around the paths contained in exec_path (i.e., the path to the exe and the directory sent to the exe a...

alrededor de 4 años hace | 1

Respondida
Grouping users into 3 groups using for loop and if statements
It seems like you should not be using two loops. That'll do the counting for every combination of i and k. Instead it seems like...

alrededor de 4 años hace | 1

| aceptada

Respondida
Trying to sort unique values in cell array based on different column
test = {'Type1', 'Type1', 'Type2', 'Type2', 'Type2', 'Type3', 'Type4', 'Type4', 'Type4', 'Type4', 'Type4', 'Type5', 'Type5', 'Ty...

alrededor de 4 años hace | 0

| aceptada

Respondida
How can I extract a field from a matrix of structs, preserving the shape of the matrix?
% create a 2d array of structs S: S = struct( ... 'field1',{0.96 0.33 0.61; 0.11 0.26 0.93}, ... 'field2',{0.55 0.16 ...

alrededor de 4 años hace | 0

Respondida
Remove the duplicated vector in the array
A = [1 3; 1 4; 1 3; 1 4; 2 3; 3 4; 3 4; 3 5; 4 5]; new_A = unique(A,'rows')

alrededor de 4 años hace | 1

| aceptada

Respondida
how can i create a column vector with specific values?
vec = [0; (63:-1:1).']

alrededor de 4 años hace | 0

| aceptada

Respondida
why i can't delete a surface 3d plot (fsurf i mean) whereas i can delete a plot. If it can be, how can i do that
In order for the surface to be accessible in function calls subsequent to the one in which it is created (e.g., to delete the su...

alrededor de 4 años hace | 0

Respondida
How to use arguments of other m-file in another m-file?
% get the outputs from A: [a1,a2,a3] = A(5); % use them as inputs in B: result = B(a1,a2,a3) function [out1,out2,out3] =...

alrededor de 4 años hace | 0

Respondida
Getting the ratio of consecutive links in network using loop.
A = 1:9; % unused B = [2 10 5 8 12 6 14 6 2]; B_ratio = [NaN B(2:end)./B(1:end-1)] % no loop necessary

alrededor de 4 años hace | 0

| aceptada

Respondida
Create a matrix with one vector
v=[1,2,3,4]; N = numel(v); idx = max(1:N,(1:N).'); M = v(idx)

alrededor de 4 años hace | 0

| aceptada

Respondida
How to pad NaNs in a matrix having small size to make equivalent with matrix of large size?
A = [1 2 3; 4 5 6; 7 8 9]; B = [1 2; 3 4]; [ma,na] = size(A); [mb,nb] = size(B); % one way: B_new = [B NaN(mb,na-nb); N...

alrededor de 4 años hace | 0

| aceptada

Respondida
pop up menu regarding
function file_name = get_mat_file() h = struct(); h.fig = figure( ... 'Units','pixels', ... 'NumberTitle','off',...

alrededor de 4 años hace | 0

Respondida
Vectorization of nested for loop
% random matrix G: G = rand(200,3); [r,m] = size(G); % parameter: n = 4; % for loop method (generalized): L=zeros(n,r,...

alrededor de 4 años hace | 0

| aceptada

Respondida
I am having trouble outputting the correct rating when inputting the same value for R(rivalry game) and B(bowl game). The output also doesnt consider the # of wins. Any help?
SeasonsFunction(2,false,false) SeasonsFunction(4,true,false) SeasonsFunction(7,true,true) SeasonsFunction(9,true,false) Seas...

alrededor de 4 años hace | 0

Respondida
Delete the values from array using histogram
arr(deleted_data_idx,:) = [];

alrededor de 4 años hace | 0

| aceptada

Respondida
How to export data displayed from uitable on GUI MATLAB to Microsoft Excel?
Since it appears that your MATLAB version may be older than writecell and too old to make convenient use of writetable, here's h...

alrededor de 4 años hace | 0

| aceptada

Respondida
How can I graph data from a database in my program
property.propertyprice and property.Address are both strings. It's possible to remove the $ and , characters from the prices and...

alrededor de 4 años hace | 0

Respondida
How to take function as an input and differentiate it( str2func not working) ?
Use str2sym instead of str2func syms x; % y = str2sym(input('Enter one variable wquation, e.g @(x)2*x - 3: ', 's')); y = str2...

alrededor de 4 años hace | 0

| aceptada

Respondida
Find pattern in vector while ignoring/skipping certain indices
% the pattern: pat = [0 4 NaN 0 6 NaN 0 8 NaN]; % create some data containing the pattern: data = randn(1,10000); idx = fi...

alrededor de 4 años hace | 0

Respondida
Iterating over array in pair-wise manner and calling function with two args and taking max over all pairs
The problem is these lines: region1 = regions(i); region2 = regions(j); Since regions is a cell array, the above lines of cod...

alrededor de 4 años hace | 1

| aceptada

Respondida
How to compare the last updated value with the previous values in the array that is concatenated(row-wise) continuously with the new data?
Here is something that mimics the situation in your code, as I understand it. This builds the n-by-2 matrix A row-by-row and eac...

alrededor de 4 años hace | 1

| aceptada

Respondida
how can i organize a column vector in a specific rows?
x = (1:1536).'; reshape(x,24,[]).'

alrededor de 4 años hace | 0

| aceptada

Respondida
minimun value in a column matrix with its index
A(A~=0) is a 4-by-1 vector: A=[0; 5 ;6 ;9 ;55]; A(A~=0) When you do min on that you find that 5 is the minimum, which occurs ...

alrededor de 4 años hace | 1

Respondida
I want to plot this semi circle
I'm not sure where a equals 22 degrees comes from. That semicircle corresponds to an angle of 90 degrees to 270 degrees. Settin...

alrededor de 4 años hace | 0

| aceptada

Respondida
mean of rows across columns in matrix
M = rand(2,400,145); % random array new_M = [M; mean(M,1)]; % append the mean of row 1 and 2 to the end, to make new_M siz...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to set clipping of text in graph from all sides, so it stays in requested area
You can achieve partial text clipping by setting the 'ClippingStyle' property of the axes to 'rectangle': xy = [0.95, 0.8]; pl...

alrededor de 4 años hace | 2

| aceptada

Respondida
How can I display numeric value (that is percentage) in edit text by using pushbutton?
First, what is the intent of these lines? seg = handles.segmentedImage; seg = imbinarize(I,graythresh(I)); If the intent is t...

alrededor de 4 años hace | 0

| aceptada

Cargar más