Answered
Matlab Calculates mod(2^1000,10^23) wrong
If you want this much precision, maybe you should use a different method. |2^1000| is a 301 digit number. It will take at least ...

8 years ago | 0

Answered
Save Histogram data without figure
You can create a figure with the |Visible| property set to |'off'|. f=figure('Visible','off'); X=randi(15,1,100); his...

8 years ago | 0

| accepted

Answered
partial match of 2 string vectors with different lenghts
Something like this: str1= ["16-10-2017 09:20:00"; "16-10-2017 09:21:00"; "16-10-2017 09:22:00"; "16-10-2017 09:23:00"]; ...

8 years ago | 1

Answered
Index of the last non-zero value
You can check the doc for |find|: the |k = find(X,n,direction)| syntax should work for you. k = find(A,1,'last');

8 years ago | 0

| accepted

Answered
how to delete repeated rows ?
How about this: isMRR=cellfun(@(x) strcmp(x(1:3),'MRR'),data); isRR=cellfun(@(x) strcmp(x(1:2),'RR'),data); toBeDelet...

8 years ago | 0

| accepted

Answered
PORQUE SE CONGELA MI PC AL USAR SOLVE.?
If you are using R2018a, there is a known bug in handling of symbolic variables, which is fixed in an update package. You can do...

8 years ago | 1

Answered
How do I create a Gaussian pulse for the given expression?
Something like this? f=250*10^6; A=35; N=5; t=linspace(0,2*N/f,500); V=A*(1-cos(2*pi*f*t/N)).*sin(2*pi*f*t).*(t<(N/f)...

8 years ago | 0

| accepted

Answered
why is there a big difference between trapz and mean
You need to use some tricks to use |trapz| to estimate a mean. Specifically, you need to divide by the distance between the firs...

8 years ago | 0

| accepted

Answered
Why doesn't mksqlite work on Matlab Online?
It might no longer be the case, but <https://www.mathworks.com/matlabcentral/answers/306462-using-compiled-mex-files-in-matlab-o...

8 years ago | 0

| accepted

Answered
How to write a loop for finding similar values in the first column and then sort them in a way corresponding values in a same row sort according to the first column?
How about using the second output of |sort| to re-order the rows, or better yet: use |sortrows|. No need for any loop if you nee...

8 years ago | 0

| accepted

Answered
Undefined function or variable 'v'.??
You made the classic mistake of thinking that this set of logical statements would be handled for each element of your vector. B...

8 years ago | 1

Answered
How can i add a 2D matrix of zeros on top of a 3D matrix of logicals
You can use the <https://www.mathworks.com/help/matlab/ref/cat.html |cat|> function: ffilter2=ffilter2(:,:,(1:617)); [N,...

8 years ago | 0

| accepted

Answered
Pixel to mm conversion using Image pixel spacing value
As described by <http://dicom.nema.org/DICOM/2013/output/chtml/part03/sect_10.7.html the NEMA page for this specific DICOM tag>,...

8 years ago | 1

| accepted

Answered
How can my code know if it iss called from the base or from some other function?
With the |dbstack| function you can get the calling functions. Be aware that some releases have a function that is called to run...

8 years ago | 0

| accepted

Answered
display numeric value in edit text (matlab GUI)
Instead of posting a new question and closing <https://www.mathworks.com/matlabcentral/answers/402855-not-display-in-edit-text-b...

8 years ago | 0

Answered
detrending data using linear regression
Why do you not want to use the |detrend| function? If you want a linear fit, you can use |polyfit|, but you can also use |\|....

8 years ago | 0

Answered
datetime millisecond conversion puzzling
This actually may already return integers. If you look closely, you see the |1.0e+06*| modifier. trigsStimulusStart = ...

8 years ago | 1

Answered
Add a vector in another vector
The code below should work. A=rand(1,100); B=zeros(1,10); wanted_index=5; if wanted_index==1 result=[B A]; ...

8 years ago | 0

| accepted

Answered
not display in edit text box matlab GUI
|uicontrol| objects have a |String| property that you need to set. The line below should help you along. set(handles.edit1,...

8 years ago | 0

| accepted

Answered
How to represent function which is defined on different interval?
You can use a for-loop to compose the function out of the parts using anonymous functions: phi_part_i=@(x,i) ... M*(...

8 years ago | 1

| accepted

Answered
what is the meaning of this code ?
The exact meaning depends on the context. The comparison is calculated element by element, so those vectors convert to |[fals...

8 years ago | 0

| accepted

Answered
Linear interpolation and Integral
For interpolation there is the |interp| function family: <https://www.mathworks.com/help/matlab/ref/interp1.html |interp1|>, <ht...

8 years ago | 0

Answered
Derivative of function handle
Let go through this step by step. To take the derivative of a symbolic function, you have to create a function handle, which ...

8 years ago | 6

Answered
infinite loop and the term within loop again contains infinity
I found an answer to your question on <https://stackoverflow.com/questions/11839394/infinite-integration-with-matlab stackoverfl...

8 years ago | 0

Answered
How to make a vertical label horizontal?
How about this: x = 1:15; y = randi([10 30],size(x)); name = {'gross', 'comp', 'rate', 'inv', 'gross', 'comp', 'rate'...

8 years ago | 2

| accepted

Answered
Error using horzcat dimensions
You are try to concatenate (i.e. combine) some arrays that don't have matching sizes. The code below should work, but might not ...

8 years ago | 0

Answered
Updating an array elements with elements from another Array
How about something like this: A = rand(10,10); B = rand(10,10); Result = A-B; LogicalIndex= Result<0; A(Logica...

8 years ago | 1

| accepted

Answered
Problem with the function eig(), is not the same [vec, val1] = eig (A) and val2 = eig (A), the eigenvalues do not match.
Short answer: |e-15| is essentially |0|, so those two values _are_ equal. Long answer: Matlab uses binary (duh.), which can't...

8 years ago | 1

Answered
I have windows 7 64 bit. Which latest version of Matlab I can buy for installation in my laptop?
<https://www.mathworks.com/support/sysreq.html The current version: R2018a.>

8 years ago | 0

| accepted

Answered
Automatic parfor without specify it
No. The reason is that there are some restriction imposed on parfor-loops (mostly related to dynamic indexing), which are not im...

8 years ago | 0

Load more