Resuelto


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

casi 7 años hace

Resuelto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

casi 7 años hace

Resuelto


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

casi 7 años hace

Resuelto


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

casi 7 años hace

Respondida
Split binary number into individual bytes
This approach save the result in a cell array: fid = fopen('File.txt'); data = textscan(fid,'%s'); fclose(fid); dataNew = ce...

casi 7 años hace | 0

| aceptada

Respondida
select rows satisfying a particular condition
a = randi([0,2],5,10); start_index = 1; end_index = 3; b = mat2cell(a(start_index:end_index,:),ones(1,end_index-start_ind...

casi 7 años hace | 1

Respondida
Specifying attributes of objects created in GUIDE
set(handles.yourButton,'Units', 'pixels') %If your position is in pixels set(handles.yourButton,'Position', [1.0, 1.0, 2.0, 1.5...

casi 7 años hace | 0

Respondida
Problem with logical indexing
I think you have a typo, calling infinite times the function freezing, then: function numfreeze = freeezing(temperatures) ...

casi 7 años hace | 1

Respondida
How to order a matrix?
Try this: [~,ia,~] = unique(A(:, 2:3),'rows','stable'); B = A(ia,:);

casi 7 años hace | 0

Respondida
Correct error in logical indexing
Your loop only runs for k = length(PassCoord), you need to put the limits of k (1:length(PassCoord)): for k = 1:length(PassCoor...

casi 7 años hace | 1

| aceptada

Respondida
Matlab saying that cell is empty when it is not?
Your loop is not a loop in fact (it is only running for i = 1460, the last cell). Then you need: for i = 1:1460; hours{i} ...

casi 7 años hace | 1

Respondida
explain the working of this code ??
It is an inefficient way to count the number of 1's in matrix I

casi 7 años hace | 1

Respondida
how to save this figure with plot to tif
This is a good solution: https://es.mathworks.com/matlabcentral/fileexchange/23629-export_fig

casi 7 años hace | 0

Respondida
[QA]How to load parameter in *.m file by matlab script into workspace
The function callParam doesn't have any output variable. Then you need something like function CONST_PARAM = CallParam ru...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to find common rows between two cell arrays containing string values?
An option: A = {'ABC','DEF';'HTG','JUKI';'RTHG','KIO'}; B = {'HTG','JUKI';'GHTY','UJIK';'RTGHY','IOP'}; setdiff(A,setdiff(A,B...

alrededor de 7 años hace | 0

Respondida
Cell array / Concatenate non - NaN results
A(cellfun(@isnan,A)) = [];

alrededor de 7 años hace | 0

Respondida
How to get Matlab read my char file in excel?
Is this that you want? [~,text,~] = xlsread(filename); text = char(text);

alrededor de 7 años hace | 0

Respondida
Rearrange matrices in a cell array
data = cell(1,10); data(:) = {deal(rand(4))}; idx = 1; x = rand(4); newData = [data(1:idx-1),x,data(idx:end-1)];

alrededor de 7 años hace | 1

| aceptada

Respondida
help with this problem please
A good option is to use the try catch statement, then: prompt = {'Choose the figure name','Choose the Tree name',... ...

alrededor de 7 años hace | 0

| aceptada

Respondida
I have two guis and I need to share data between them.how to share data between them
The best option is to use setappdata and getappdata functions: https://es.mathworks.com/help/matlab/ref/setappdata.html https:...

alrededor de 7 años hace | 0

Respondida
Matlab iteration through excel rows
Try this, is that you want? filename = 'example.xls'; excelSheet = 'example'; columnName = 'Name'; columnDefault = 'Default'...

alrededor de 7 años hace | 0

Respondida
What wrong in line 12 ?? help me please (Index exceeds matrix dimensions.)
In this line: u1(n+1)=u1(n)+1/2*(4*exp(0.8*t(n))-0.5*u1(n)+4*exp(0.8*t(n+1))-0.5*u3(n)); the length of t is n, then t(n+1) giv...

alrededor de 7 años hace | 0

Respondida
How can I increase this code's efficiency?
There are many options, but the main goal is to reduce the number of calls to xlsread (it is really slow). One option: function...

alrededor de 7 años hace | 1

| aceptada

Respondida
Creating a cell and allocation specific text
result = cell(1,length(beta)); result{1} = {'Intercept'}; result(2:end) = sprintfc('X%d', 1:41);

alrededor de 7 años hace | 1

| aceptada

Respondida
how can i plot in the while loop
Then, you simply need this: t=16; d=23; M=5; N1=floor(((275*(1/M))-30+d)-2); s1=23.45*sind((360/365)*(284+(N1+2))); l=35.4...

alrededor de 7 años hace | 0

| aceptada

Respondida
Swap group of elements in a matrix with specific conditions
Try this: a(:,[3,4]) = sort(a(:,[3,4]),2,'descend');

alrededor de 7 años hace | 0

Respondida
Numerical solution of a matlab function.
Try changing the interval fplot(F,[0,1e7]) Then, you can use: fzero(F,1e5) ans = 9.6575e+05

alrededor de 7 años hace | 1

| aceptada

Respondida
Index exceeds array bounds error in nested for loop
The length of A is 8. In this loop for x=1:1:i for j=1:1:(N/2) B{j} = imadd(A{x},A{x+1}); x...

alrededor de 7 años hace | 0

| aceptada

Respondida
If statement for equal rows from two different files
Try this: A = [4.1 5.3 0.02;0.4 1.0 1.11;5.8 0.4 0.85] B = [6.0 2.1 0.82;0.4 5.3 1.00;4.1 5.3 0.02;7.2 0.2 1.57;0.4 1.0 1.11;5...

alrededor de 7 años hace | 1

| aceptada

Respondida
Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be inf
Use fplot: interval=[0 10]; y=@(x) 1/x; fplot(y,interval)

alrededor de 7 años hace | 0

Cargar más