Respondida
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...

alrededor de 8 años hace | 0

| aceptada

Respondida
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"]; ...

alrededor de 8 años hace | 1

Respondida
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');

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 1

Respondida
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)...

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 1

Respondida
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,...

alrededor de 8 años hace | 0

| aceptada

Respondida
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>,...

alrededor de 8 años hace | 1

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

Respondida
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 |\|....

alrededor de 8 años hace | 0

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

alrededor de 8 años hace | 1

Respondida
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]; ...

alrededor de 8 años hace | 0

| aceptada

Respondida
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,...

alrededor de 8 años hace | 0

| aceptada

Respondida
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*(...

alrededor de 8 años hace | 1

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

| aceptada

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

alrededor de 8 años hace | 0

Respondida
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 ...

alrededor de 8 años hace | 6

Respondida
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...

alrededor de 8 años hace | 0

Respondida
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'...

alrededor de 8 años hace | 2

| aceptada

Respondida
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 ...

alrededor de 8 años hace | 0

Respondida
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...

alrededor de 8 años hace | 1

| aceptada

Respondida
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...

alrededor de 8 años hace | 1

Respondida
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.>

alrededor de 8 años hace | 0

| aceptada

Respondida
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...

alrededor de 8 años hace | 0

Respondida
How do I get all the plots to show over each other?
Something like this maybe? samplingfrequencies = [5, 7, 8, 9, 20]; colors = 'bgrcm'; i = 1; for n = samplingFreque...

alrededor de 8 años hace | 0

Cargar más