Respondida
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(['...

más de 7 años hace | 0

| aceptada

Respondida
How to calculate the shortest distance between points and a line?
You can use the point_to_line_distance function.

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

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

más de 7 años hace | 1

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

Respondida
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);...

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 1

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

| aceptada

Respondida
Round to Nearest Multiple of 4.
a=45; k=4; b=k*round(a/k);

más de 7 años hace | 6

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 3

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

Respondida
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,'...

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

Respondida
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;

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

Respondida
Mean of elements of a vector
Use a convolution. conv(data,[0.5 0.5]) should be a good start.

más de 7 años hace | 1

Cargar más