Réponse apportée
How to find the local mean of an image?
The fastest way to get a local average is to do a convolution with a flat structuring element: %load example image A=imread(['...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to calculate the shortest distance between points and a line?
You can use the point_to_line_distance function.

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Can isstrprop search for 2 properties?
I would convert to double type and use ismember to check if all characters are allowed. Alternatively you could just convert ...

plus de 7 ans il y a | 1

Réponse apportée
EULER'S METHOD GUI HELP
You are using str2num (which you shouldn't), and you are setting a numeric vector as the string property. You may need to consid...

plus de 7 ans il y a | 1

Réponse apportée
How do i create checkboxes near each plots in a subplot window ?
You can use uicontrol('Style','checkbox').

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Matching based on working days
You can use the weekday function. You can easily adapt the function below to apply specific shifts. A=datenum({'2019-04-07','20...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Two differente program to write in the same place
This is just a simple concatenation: function output=xx output=[main transfer]; end function output=main output=rand(19,6);...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
help with this 02 questions please
For question 1: link For question 2: you can create a CloseRequestFcn that also closes the secondary app link.

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Memory issue to create 4D array
The amount of data is probably huge, is not pre-allocated and will probably not fit in memory. Have you calculated an estimated ...

plus de 7 ans il y a | 0

Réponse apportée
Finding pythagoras triples when only c is known
You are quite close. The code below contains some optimization in terms of selection of values to check, and the check is modifi...

plus de 7 ans il y a | 1

Réponse apportée
how do i read a folder database into matlab
Use uigetdir to ask the user for a folder, then use dir to get the list of files inside that folder, then use a for loop to load...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
if statement not working
What you probably think should happen is in the code below, however, there is a better way. A = [5;5;5;3;3;2]; B = [10;4;10;10...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How can I change from Cell to Double and writing in many lines
The code below should do what you want. %generate input A=cellfun(@(x) {x+rand(6,6)},num2cell(1:19)'); %convert the cell co...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Round to Nearest Multiple of 4.
a=45; k=4; b=k*round(a/k);

plus de 7 ans il y a | 6

| A accepté

Réponse apportée
sequential file reading and operations
That is not how the textscan function works. You should read the documentation for the functions you are using. figure(1) root...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
code with the same function
There are two easy options: a loop and a histogram: %for loop method: data = fileread('mytextfile.txt'); letters='ABCDEFGHIJK...

plus de 7 ans il y a | 1

Réponse apportée
Test poker hand by using edit text boxes GUI
What I would do is first of all change your value convention to something more standard (Ace=1,Jack=11,Queen=12,King=13) or keep...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Game of GUI matrix dimensions must agree
Because a char array is an array of values in Matlab, you are trying to compare an array of values to another array. If what you...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Change function name everywhere
If you change the name in the function declaration, the auto-change should work, just as with variable names inside the same sco...

plus de 7 ans il y a | 3

Réponse apportée
How to Create Multidimensional table in for loop
A bold guess based on your commented code: Trajectory =1:15; TrajDetail = zeros(1,4,15); for i = 1:length(Trajectory) TS...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
could anyone hep me to clear my doubt
Because inf is the extreme, you can use it to find the next value in your data. As an example, the code below finds the maximum ...

plus de 7 ans il y a | 0

Réponse apportée
How do I add data to multiple figure windows in one loop?
Use explicit handles: fig4=figure(4); fig5=figure(5); %'NextPlot','add' is equivalent to hold('on') ax4=axes('Parent',fig4,'...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to unit (combine) logical array "along" it's 3rd dimension or How to find logical OR betwen all pages along 3rd dim of 3D array
As Guillaume mentions, you should be using this: any(L,3) instead of my original answer sum(L,3)>0 (Even if the result shoul...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to avoid evalin?
You can solve it this time by loading into a struct: S=load('GivenFile.mat'); fn=fieldnames(S); for n=1:numel(fn) tempVa...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
App Designer button callback
You can force a graphics update with drawnow, or by introducing a small pause (in general I see people using pause(0.01) or a si...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to fast process a calculation within a matrix without using a loop?
Yes, use the power of array processing in Matlab: B=10.^-A;

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can i know what is the n when the nth is the smallest or biggest
If you mean the index of the minimum value, the documentation for the min function shows you how to find the index. A different ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Entering default values in a function.
If you only want to specify n, you should only provide that as the input: n=4; [counter,ratio,x,TOL,ROC]=FixedPointIteration(n...

plus de 7 ans il y a | 0

Réponse apportée
Input data using GUI
Have a look at the code below, read the documentation for every function that you don't know and try to understand the flow of t...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Mean of elements of a vector
Use a convolution. conv(data,[0.5 0.5]) should be a good start.

plus de 7 ans il y a | 1

Charger plus