Respondida
How can i sum cells that equals in matrix
a=[2 2 2 2 1 1 1 1 0 0 1 0]; sum(sum(abs(diff(a,1,2)),2)==0)

más de 8 años hace | 0

Respondida
How to code dependent popup menus in Guide GUI
Use code like this in the callback of the first popup menu: popup2_database={{A1, A2},{B1, B2},{C1, C2}}; val=get(hObjec...

más de 8 años hace | 0

Respondida
Could anyone help me how to write the matrix with respect to diagnol in the for loop.
I'll add my solution as a separate answer to avoid confusion. m=[2 4 6 8 10]; n=[12 14 16 18 20]; iwant = cell(length...

más de 8 años hace | 1

Respondida
randomisation of arrays in Matlab
I didn't ensure the sizes are different, but this code works for any number of vectors. Parts of partitions may be empty. If tha...

más de 8 años hace | 1

| aceptada

Respondida
Could anyone help me to solve on unused_rows=1:50
If you look at the code in my <https://www.mathworks.com/matlabcentral/answers/375939-how-to-run-the-following-code-for-n-number...

más de 8 años hace | 0

Respondida
How to run the following code for n number of rows and m number of columns.
%generate random data for A and B (replace this with your real data) m=50;n=2*m; A=randi(m*n,m,n); %B=randi(m*n,m,n)....

más de 8 años hace | 2

| aceptada

Respondida
breakpoints locations settings for a huge project
Looking in the doc for the |dbstop| function, it describe a method to do this: b = dbstatus('-completenames'); dbstop(b)...

más de 8 años hace | 4

| aceptada

Respondida
Could anyone help me to obtain new_C for the below mentioned code
Let me help you out here, before everybody jumps out of the window. You have already had some help about how to get a vector ...

más de 8 años hace | 0

Respondida
how to change the value of X in repmat
This is a part of a large number of questions. From that context I know you are trying to adapt the code I suggested to a more g...

más de 8 años hace | 0

Respondida
could anyone help me to get C from A and B
Let me start off by saying you described it very poorly (and formatting your comment as code doesn't help). What seems to be ...

más de 8 años hace | 0

| aceptada

Respondida
getting an error while using rest slice viewer ??
Apparently rest slice viewer was made for HG1 releases (which have numerical handles), and so is not compatible with HG2 release...

más de 8 años hace | 2

Respondida
How to pause a loop of frames using toggle button?
You are setting |start = 1| before your loop. What you might do is this: while ( start <= nFrames ) && ( get(hObject,'Va...

más de 8 años hace | 0

| aceptada

Respondida
how to avoid the following error
Apparently |throughput_Et| is a function handle, not a matrix. Watch out with your assignments so you don't overwrite any functi...

más de 8 años hace | 0

Respondida
How to concatenate these matrices where the below matrices are formed out of permutation?
Why not use this: i_matrix=perms([0 0 1 1]); Otherwise, just put it in a matrix inside your loop.

más de 8 años hace | 0

| aceptada

Respondida
Can't load dataset from .mat correctly?
In your code you save the mat file with this line save fasterRCNNtestImages.mat result; This creates a mat file with the...

más de 8 años hace | 0

| aceptada

Respondida
Installation Temporary Folder, how to use it to re-installing?
Either the main folder or the bin folder will very likely contain a setup.exe. Any missing file will be downloaded as well, gene...

más de 8 años hace | 0

Respondida
Is it possible to join pdf files with MATLAB?
I don't know an easy way with Matlab, but you can trivially solve this with pdfLaTeX. You can even build this file with Matlab. ...

más de 8 años hace | 3

| aceptada

Respondida
Why does 0 times infinity not equal 1?
This is not a Matlab question. _massively simplified 'answer' incomming:_ Infinity is a strange thing. If you approach it ...

más de 8 años hace | 0

Respondida
hi,How to plot different graphs on same figure Hold on after using for loop of image MATLAB
Move everything that doesn't change out of your loop. This includes a call to |figure|, which creates a new figure window every ...

más de 8 años hace | 0

| aceptada

Respondida
Is there a MATLAB-online-only license?
As far as I know there isn't a cheaper license for only-online. From <https://www.mathworks.com/products/matlab-online.html t...

más de 8 años hace | 0

Respondida
Matlab 6.5 on Windows 10
Although in general I would absolutely second the previous remarks, there might still be a valid reason wanting to run R6.5 on W...

más de 8 años hace | 3

Respondida
How do I make my script accept matrix as input with proper fprintf output?
degree=[90 80 70;60 50 40;30 20 10]; radian = deg2rad(degree); output=[degree(:).';radian(:).']; fprintf('Degree Radi...

más de 8 años hace | 0

Respondida
This code snippet causes Matlab to crash
_(Please use the comment field for responses, instead of the answer field)_ On R2017b on 64 bit W10 I can't reproduce this (n...

más de 8 años hace | 0

| aceptada

Respondida
How to find elements between zeros in matrix?
Use <https://www.mathworks.com/help/matlab/ref/find.html |find|>. ind=find(A); [r,c]=find(A);

más de 8 años hace | 0

Respondida
Could anyone tell me how to execute the following code
Read the error message and the documentation. What is supposed to happen when you have only 2 values and you ask Matlab to pick ...

más de 8 años hace | 0

Respondida
How to allocate files to an array?
Don't. Automatically generating names for variables (e.g. with |eval|) is a bad idea. Use cell arrays instead. Introspective ...

más de 8 años hace | 0

Respondida
how to solve a error?
Then the answer is in the error message: the file does not exist. Note that your file separator depends on your system. That's t...

más de 8 años hace | 0

Respondida
Subplot in a for-loop
change subplot(4,5,i); to subplot(4,5,i-15); That way you make sure the indices start at 1 for the second figur...

más de 8 años hace | 1

| aceptada

Respondida
how do obtain sum of two rows
x=rand(18482,7); x2=sum(x,2); x2=x2(1:2:end)+x2(2:2:end);

más de 8 años hace | 0

Respondida
How do you store solutions to a loop in an array?
%replace x=[r,t,j]; %with k=k+1;x(k,:)=[r,t,j]; Set k to 0 before the loops and pre-allocate at least one row of x...

más de 8 años hace | 0

Cargar más