Réponse apportée
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...

environ 7 ans il y a | 1

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

Question


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 ...

environ 7 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
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;...

environ 7 ans il y a | 1

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

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

environ 7 ans il y a | 0

Réponse apportée
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]); ...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 1

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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 ...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
How can I add legend or color index to my scatter function
Hi please check the legend function below: Legend

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 2

| A accepté

Réponse apportée
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 ...

environ 7 ans il y a | 0

Réponse apportée
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))...

environ 7 ans il y a | 0

Réponse apportée
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.

environ 7 ans il y a | 0

Réponse apportée
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

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 3

Réponse apportée
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...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

Charger plus