Answered
Combine each row of matrix into a single vector within a cell array
This sounds like a job for |num2cell|. A = rand(100000,1800); tic b = cell(size(A,1), 1); for ii = 1:size(b,1)...

8 years ago | 3

| accepted

Answered
How do I extract subset of all fields from structure?
index = data.temperature > 300; data2.time = data.time(index); data2.temperature = data.temperature(i...

8 years ago | 3

| accepted

Answered
Making a button display a value in a message box
Global variables are a bad programming practice, which can cause serious troubles and which impede the debugging massively. Ther...

8 years ago | 0

Answered
How to add location of dll files to the system path.
There is a community for the MicroManager: <https://micro-manager.org/wiki/Micro-Manager%20Community>. Ask there for help. But y...

8 years ago | 0

Answered
How to create a click-train with
Your code looks okay. I'd omit the useless "clear,clc" and use fullfile instead of concatenating file names by [pth 'clicktrains...

8 years ago | 0

| accepted

Answered
Evaluate if pushbutton is pressed in conditional 'if'
I guess you mean the |Value| of the objects: function callback(hObject) res_after_opt = guidata(hObject); if res_afte...

8 years ago | 0

| accepted

Answered
how to mind the nth max or min value of a column matrix with its location
a = rand(3,4); b = sin(a); [bs, index] = sort(b, 2); % If you want to sort along the rows s = size(a); indexL = ...

8 years ago | 0

Answered
Will functions inside my ODE bottle neck the code?
Without seeing the code it is impossible to know the reason of the slowdown. But 6-8% is really small. Do you have a machine wit...

8 years ago | 0

Answered
How to convert a cell with rows of different lengths into a double cell/mat??
Maybe you mean: Data = cat(2, input{:}); GroupMean = mean(Data); But this would not match "rows of different len...

8 years ago | 0

Answered
delaunay.m file source code
So, how can i see source code? You can't. The source code of built-in function is not provided to the customers. &nbsp; ...

8 years ago | 0

| accepted

Answered
Attempted to access q(1,3); index out of bounds because size(q)=[2,2]. Error in vactora_1 (line 10) ;q(j-1,i) = q(i,j);
q is meaningless here. Even if the dimension would be correct, it contains zeros only. In consequence q(j-1,i)*B(:,j-1) is 0 in ...

8 years ago | 1

| accepted

Answered
I have an array [0,0,0,0,123,0,138,44,123,0,0,0,0,0,135,0,123,0,0,125........] I want to find starting and ending index for pattern [123,0] like[5,6,9,10....] Please help me find the ending indices
pattern = [123, 0]; a = [0,0,0,0,123,0,138,44,123,0,0,0,0,0,135,0,123,0,0,125]; idx = strfind(a, [123,0]); ...

8 years ago | 1

| accepted

Answered
In ODE solver how to use the time step of each iteration within the differential equation?
deltat is the time step during that iteration This is not a meaningful statement. Remember that ODE45 evaluates the equation...

8 years ago | 0

Answered
How to read video frames the fastest.
Replace: for i = 1:3 data(cnt,i) = mean2(frame(:,:,i)); %Average of each RGB value for each frame end by ...

8 years ago | 0

Answered
How to customize the step of round function?
Do you want this: T = 54.3115; Az = (0:89)/T; %array of numbers which I want to be rounded A = [0:5:45 5...

8 years ago | 0

| accepted

Answered
What is qhullmx.p file and how to use it?
Such private functions are not thought to be called directly. This is not even possible for files in the \private folders. This ...

8 years ago | 1

| accepted

Answered
Problem with char format values
Matlab's |char| values can contain Unicode characters with 16 bits, but ASCII means 8 bits (or maybe only 7). Please post the...

8 years ago | 0

Answered
Reduce the computational time
Just one of the many points: for i = 1:Ly for j = 1:Lx if IM(i,j)~=1 IM ( i , j ) = 0 ; end ...

8 years ago | 0

| accepted

Submitted


DateStr2Num
Convert date string to date number - C-Mex: much faster than DATENUM

8 years ago | 3245 downloads |

4.9 / 5
Thumbnail

Answered
How to find or how to get image DPI ,without using imfinfo ? can anyone share idea's?
There i no general method to do this. At first you have to clarify what type of "images" your are talking of. If you e.g. have a...

8 years ago | 0

Answered
How can i draw an exponential curve for a damped sine wave?
See: * <https://www.mathworks.com/matlabcentral/answers/168557-how-can-i-draw-the-corresponding-exponential-decay-curve-to-fi...

8 years ago | 0

Answered
Is there a way to limit webread() to a certain amount of lines?
If you request the contents of the web page, the data are delivered through the internet. The server is responsible for sending ...

8 years ago | 0

Answered
What CPU would be best to improve simulink simulation speed?
If e.g. the memory is exhausted and the laptop uses a slow harddisk or cheap eMMC drive as virtual memory instead of a modern SS...

8 years ago | 0

| accepted

Answered
Concatenation inside cell arrays
This is easy and efficient with a loop. I do not see, why you assume that it is "very complicated and time consuming". % In...

8 years ago | 1

| accepted

Answered
Comma Separated Imported Data
Remove the double quotes at first: S = fileread(FileName); S(S == '"') = []; fid = fopen(FileName, 'w'); fwrite(fi...

8 years ago | 0

Answered
Why Matlab give me this warning?
If it is really a ".dll" file, it is outdated for a long time. Modern compiled Mex functions have the extension as e.g. '.mexw64...

8 years ago | 0

Answered
how to make a variable execute only once ?
If you need a persistent variable, it is required to store the code in a function. To be exact, at least the persistent variable...

8 years ago | 1

| accepted

Answered
how can i get in place of %d is i values for each iteration of e
num_nod=input('num_nod = ') for e = 1:2*num_nod force(e,1) = input(sprintf('applied forces at node %d: ', e)); end...

8 years ago | 0

| accepted

Answered
Write a script to calculate the sum of even numbers from between 1 to 1000
Concerning you pseudo-code: % There is no need to enter a number. % Num = input('enter integer no') % You want the ...

8 years ago | 1

Answered
How can I inactivate my license at Harvard and activate it on this PC?
Open the license center in the net: <https://www.mathworks.com/licensecenter/licenses> Select the license. Open the "Insta...

8 years ago | 0

Load more