Respondida
getpixelposition vs OuterPosition of figure
Hi Jim, I generally set 'units' property as 'normalized' for all figures and uicontrol elements in my codes. Even the screen...

alrededor de 7 años hace | 1

Respondida
OOP: Select Data with conditional
Hi Nycholas, Try this code below. Filtered array will return to you Jessie and Kayle which meets the conditions. dog1 = anim...

alrededor de 7 años hace | 0

| aceptada

Pregunta


How to get a small GUI window figure which is saved before?
Hello ! I have created a GUI with my own code. In my GUI, I have 2 buttons: Add New and Edit. When clicked on Add New, there ...

alrededor de 7 años hace | 1 respuesta | 0

1

respuesta

Respondida
Resize a matrix into another with different size
Hi, Try this: k = 26; X = [1:k]'; [n,m] = size(X); rows = 4; columns = ceil(n/rows); X(numel(X):(rows*columns)) = NaN;...

alrededor de 7 años hace | 1

Respondida
How can I put a struct output into the i-th field of a struct on MATLAB?
Hi, You can do it as follows: After that you have out.S as an array so you can assign it to any other struct. for i =1:Number...

alrededor de 7 años hace | 0

Respondida
How to eliminate unwanted grids on the z-axis?
Hi Edward, Maybe this can solve your problem: set(gca,'XMinorGrid','off'); set(gca,'YMinorGrid','off'); set(gca,'ZMinorGri...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to find values of variables?
Use divide operator directly to solve Ax = B type linear equations. Here is the link. mldivide

alrededor de 7 años hace | 0

Respondida
Storing Data into a Matrix from a for loop
Hello Estevan, Try this: position = zeros(1,1000); tails = 0; heads = 1; for s = (1:1000) x=randi([0 1]); ...

alrededor de 7 años hace | 0

Respondida
How to Calculate linear trend for each column of a matrix
Hi, I think you can use polyfit simply for this problem. Here is an example code. You can apply it for the other columns asw...

alrededor de 7 años hace | 0

Respondida
Using save(Filename) in a Callbackfunction of a button
"Does hObject include all GUI objects in the function workspace?" According to that, if you define all of your uicontrol elemen...

alrededor de 7 años hace | 1

Respondida
how I do it. the function is called a string is passes a numbr
Hello Dezdi, You can do it by first collecting your inputs in a cell array and then call your function in a for loop with 5 el...

alrededor de 7 años hace | 0

Respondida
Help With Bar Position
Hi Naomi, You can add zero value bars to add it to further I think. Try that below: %Data Data=[8 12] %Percent Increase ...

alrededor de 7 años hace | 0

Respondida
How can I create a function that inputs a row
Hi, Your return value should be written like below for functions. Your inputs should be written inside the paranthesis. fun...

alrededor de 7 años hace | 0

Respondida
How can I fit a curve to x, y points and obtain the regression?
Hello Sarah, you can use polyfit. It uses least squares, here is the link you can read about it: polyfit

alrededor de 7 años hace | 0

Respondida
Can I use fullfile() to read two subfolders ?
Hello Yanagawa, You should use for loop for that operation to get one by one each folder path. Try this (also detects all fol...

alrededor de 7 años hace | 1

| aceptada

Respondida
How can I add legend or color index to my scatter function
Hi please check the legend function below: Legend

más de 7 años hace | 0

Respondida
xlsread error, wont open file
Hello Anthony check the inputs of xlsread function. First input should be the full file name with path or if your matlab‘s cur...

más de 7 años hace | 0

Respondida
I have a code but it keep saying "invalid expression. when calling a function or indexing a variable, use parentheses. otherwise check for mismatched delimiters.
Hi Roolientha, Your expression is invalid because you are calling a function sin with brackets not paranthesis. sin[..] %c...

más de 7 años hace | 2

| aceptada

Respondida
Create 3D matrix with 1s in certain position and all other elements 0s (NO FOR LOOP)
Hi Pietro A = zeros(3,5,5); site = [1,2,3,4,5]'; for i = 1:numel(site) A(:,site(i),site(i)) = ones(1,3)'; end This might ...

más de 7 años hace | 0

Respondida
How can I remove entire rows from a table based on NaN values in a specific column (cell data type) in a table?
Hello Jens, Please try this: idx = find(cell2mat(cellfun(@(x) strcmp(num2str(x),'NaN'), input.var2, 'UniformOutput', false))...

más de 7 años hace | 0

Respondida
How to split time in to hours, minutes and nanoseconds
Hi, Run this code format long then run your tt you will see long format in your command window.

más de 7 años hace | 0

Respondida
I have tried to make a loop where it displays all the answers in a matrix but it doesn't give me the 21x3 matrix. Am i using wrong commands or am i missing something.
Hi Merlin, try this code below: v = []; for t = 0:1:20 v(t+1,:) = [t,sin(t),cos(t)] ; end

más de 7 años hace | 0

| aceptada

Respondida
help me with implementing simple funtion
Hello Aydin, Have a look at this str2func. It converts string into function. If you want to declare your PLearn and PRecall in...

más de 7 años hace | 0

Respondida
I am receiving an error in my script when calling a function.
Hi, While you are calling your function in case ‘1’ you should just call like below: check_inputs(L,B,T,C,U,S,t,time) I did...

más de 7 años hace | 0

Respondida
How create a programm which create new menu item in matlab
Hi Daniel, You should check the help documentations of MATLAB’s built-in functions below: uimenu, uicontrol, figure, uitable...

más de 7 años hace | 0

Respondida
How do i accept only numbers as input to forward to a switch case ?
Hi Nabeel, You can check that after getting the velocity and before your switch by using a flag isnumeric(velocity). It returns...

más de 7 años hace | 0

Respondida
Disable the "did you mean" feature
Hi Federico, Could you please check the link below you might find what you need in Display Options. Command Window Prefere...

más de 7 años hace | 0

| aceptada

Respondida
Edge Detection without function
Hello Fifit, Signal should be a vertical vector. Value is a constant double. Index is the result which is a logical array wh...

más de 7 años hace | 3

Respondida
Bubble sorting (Index exceeds the number of array elements)
Hi Karolina, I always use xlsread instead of fopen. It is always easier to see what's going on with cell arrays or table st...

más de 7 años hace | 1

| aceptada

Respondida
I would like to separate a matrix into different matrices based on a cycle of the first values
Hi Adolf, As far as I understand from your question. The cycle means that if your data is smaller than the previous data acc...

más de 7 años hace | 0

Cargar más