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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

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

circa 8 anni fa | 0

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

circa 8 anni fa | 1

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

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

circa 8 anni fa | 6

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

circa 8 anni fa | 0

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

circa 8 anni fa | 2

| accettato

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

circa 8 anni fa | 0

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 0

| accettato

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

circa 8 anni fa | 0

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

circa 8 anni fa | 0

Carica altro