Answered
how to iterate until the difference between variable is equal to zero
The iteration is not clear. You need to update the values of tf and t_ave inside the while loop. I guess that is an optimization...

7 years ago | 0

| accepted

Answered
Conversion of pixels to metric units
You need to know the pixel size/resolution (X,Y) of the image, then: Area(m^2) = Area(pixels)/(resolutionX*resolutionY)

7 years ago | 0

Answered
How to duplicate a 2000 x 200 matrix n times
Try this: repmat(A,60,1) Is it that you want?

7 years ago | 1

| accepted

Answered
Using Logical Operators && and ||
Try this: if Var1>20 && Var2>20 && Var3>20 % I've tried with and without the bracket in bold - doesn't give...

7 years ago | 0

Answered
Switching the elements of an array
N = flip(M); N(end) = 0;

7 years ago | 0

| accepted

Answered
Could anyone help me to understand the peaks?
You can use finpeaks function https://es.mathworks.com/help/signal/ref/findpeaks.html

7 years ago | 0

Answered
How to set a threshold in data
A(A>300)=300

7 years ago | 0

Answered
loaded file is pathname
You are not loading the file. fullfile function just build the name of the file. You need to use xmlread function: https://es...

7 years ago | 0

Answered
Subtracting mean of columns from corresponding columns in 3d matrix
Try this, is the result the expected one? epochs = rand([64,250,586]); col = 51; baseline = mean(mean(epochs(:,1:col,:),1),2)...

7 years ago | 0

| accepted

Answered
Solving a system of equations, with for loop ?
This is an option: TSR=7.5; %Tip Speed Ratio %a syms aux x=linspace(1,TSR,10)'; a = zeros(size(x)); for i = 1:numel(x) ...

7 years ago | 2

| accepted

Answered
Table shows [1x1 sym]
You need to convert the symbolic values to double for all the cases: a1=double(vpasolve(eqn1,a1,[1/4 1/3]));

7 years ago | 1

| accepted

Answered
i have a problem to write to a excel
Try this: d = {'usre_id' , date}; [~, user_id] = xlsread('C:\Users\AFQ1KOR\Desktop\newfolder\kkr.xlsx','A:A'); access = ismem...

7 years ago | 0

Answered
Sort struct fields by their length
Another option: a.one = rand(1,10); a.two = rand(1,15); a.three = rand(1,8); a.four = rand(1,12); [~,idx] = sort(structfu...

7 years ago | 0

Answered
asin and acos quadrant check function help
asind(x) %gives values between [-90,90] acosd(x) %gives values between [0,180] Then if you want all the values between [0,360]...

7 years ago | 0

Answered
Download Data from Excel worksheet: Automatically changing range in Excel
If you don't specify the range the whole file is loaded. Try this: T=readtable('xxx_Ang_SekUnformated.xlsx','Sheet','Worksheet'...

7 years ago | 0

| accepted

Answered
Why getting this error ? how to fix it ?
As Adam said, probably your a_sw and b_sw are arrays and then the output of this corrcoef(a_sw (i:i+300), b_sw(i:i+300)); is a...

7 years ago | 0

| accepted

Answered
nanmean different outcomes?
Your two arrays don't have the same number of non nan elements (10 vs 11), then the mean is (1.5603*sum(~isnan(A)) + 1.4139*sum...

7 years ago | 1

| accepted

Answered
Undefined operator '*' for input arguments of type 'function_handle'.
You have some mix between symbolic functions and function handles. You need to choose one strategy. Try the following code, whic...

7 years ago | 0

| accepted

Answered
How to compare ground truth with segmented image?
You can use dice or jaccard for evaluating your segmentation: https://es.mathworks.com/help/images/ref/jaccard.html?lang=en ht...

7 years ago | 1

Answered
how should i subtract two matrices
A=[ 6 12 15]; B=[50 70 80 90; 20 50 40 30; 10 60 80 90]; C = B-repmat(A',1,4);

7 years ago | 0

| accepted

Answered
Write results in Excel under multiple If statements
You need to close every if statement: for j = 1 : 2 x = randn(10,1); for k=1:2 y = randn(10,1); if ...

7 years ago | 0

| accepted

Answered
Remove rows in cell array if specific column == 0
This should work: for ii=1:3 idx = find(D{1, ii}{2, 1}(:,4)==0); D{1, ii}{2, 1}(idx,:) = []; end

7 years ago | 0

| accepted

Answered
How to calculate the distance
What do you mean by distance? euclidean, just the difference... If you are looking for the difference: B = [0 1 0 153 119 97 1...

7 years ago | 0

Answered
getting rid of decimals in matlab
round(result,1)

7 years ago | 0

Answered
Removing zeros from start of an array and inserting them at the end of same array
Try this: A = [0 0 0 0 1 2 3 4 5 6 7 8 9 0 0 0 0]; idx = find(A>0,1); B = [A(idx:end),zeros(1,idx-1)]

7 years ago | 1

| accepted

Answered
How can I add a comment on a curve ?
How can I add a comment on curve like Sc Model on the attached curve ? https://es.mathworks.com/help/matlab/ref/text.html How ...

7 years ago | 1

Answered
how can i find the value of differentiation? that is f'(2)?
syms x f=x^2- 4 a(x)=diff(f,x) a(2)

7 years ago | 1

Answered
how can i access to data in a structure?
MyMAC.result.mu MyMAC.result.Sigma

7 years ago | 0

| accepted

Answered
SWITCH expression must be a scalar or a character vector. issue
inputdls is returning a cell, and also the variable x is not defined. Then you need to do something like this: box=inputdlg('ho...

7 years ago | 1

| accepted

Answered
How to assign integers to each element in a table that has repeated elements?
x = {'Jake' ; 'Josh' ; 'Adams' ; 'Jake' ; 'Adams' ; 'Henry' ; 'Henry'} y = unique(x,'stable'); numbers = 1:length(y);

7 years ago | 0

Load more