Respondida
find multiple maximum imaginary part
Yes, [Mcamp,m] = max(imag(camp)); returns only the index _m_ of the first element if there are multiple maxima in a col...

alrededor de 8 años hace | 1

| aceptada

Respondida
Is there a function that performs element by element multiplication between two variables and stores in one of the variable by default?
Sure, there's a function for virtually _everything_ in Matlab...all operators are are aliases for the underlying functions. ...

alrededor de 8 años hace | 0

Respondida
Scatter use different colors for data-points
Close, but... :) (Always a "but", isn't there or wouldn't be asking a Q?) <VBG> colors = [[1 0 0] [0 1 0] [0 0 1] [1 1 0]...

alrededor de 8 años hace | 1

| aceptada

Respondida
How to Print a Numerical Vector to a List?
fmt=[' +,' repmat('%d,',1,8)]; % format w/ extra blank each line for delimiter later str=split(sprintf(fmt,vec),' '); ...

alrededor de 8 años hace | 0

| aceptada

Respondida
How to loop fopen/fread/fseek to analyze large binary files in shorter segments ?
file=('C:\Users\Admin\Documents\MATLAB\EOD examples\Examples 16ch\copy.mat'); fid=fopen(file,'r'); n_ch=16; ...

alrededor de 8 años hace | 1

| aceptada

Respondida
Importing large datasheet while ignoring randomly placed non-numeric data
dataArray=cell2mat(textscan(fileID,'','TreatAsEmpty', repmat('*',1,15),'CollectOutput',1)); Make sure my old eyes counted...

alrededor de 8 años hace | 0

Respondida
Plotting distance of each point in a grid from a mean
M=size(Xtr,1); N=size(ttr,1); mnXtr=mean(Xtr(Xtr~=0),:); [X Y]=meshgrid(linspace(-0.5, 1.0, M),linspace(-0.5, 1..0, N...

alrededor de 8 años hace | 0

Respondida
Using interp1 with multiple data that meets criteria - Looking to have interp 1 return the max value
Your example code returns ix=4.5; interp1(DATA(:,2),DATA(:,3),ix) ans = 6.0309 rather than 4.5; that result wou...

alrededor de 8 años hace | 0

Respondida
Plotting multiple graph in same graph
... for j = 1: 2 : size(READ,2) c = c+1; clf ... Well, you wipe out everything up to here--if ...

alrededor de 8 años hace | 1

| aceptada

Respondida
How to perform FFT on a signal with a 5 Hz frequency resolution?
The FFT resolution is based on the length of the data sample and the sample rate and the length of the computed FFT. If ...

alrededor de 8 años hace | 1

| aceptada

Respondida
How to connect lines of a scatter plot?
Well, the simple way is to do the plot of the data without the NaN elements; the builtin behavior is to ignore NaN and that's no...

alrededor de 8 años hace | 0

Respondida
How to show the values are constant inside a cell array
Presuming interpreted the meaning of "constant" in each cell, >> c{:} % small demo cell array first,last ...

alrededor de 8 años hace | 0

Respondida
How can I plot a Pareto Chart (Y-axis= Qty VS. X-axis = Part Description) for the attached Excel data table?
A={1 30 'ARD'; 2 25 'CDE'; 3 22 'BTS'; 4 10 'RSD'; 5 5 'TSE'; 6 4 'DMP'; 7 3 'MTR'; ...

alrededor de 8 años hace | 1

| aceptada

Respondida
Calculate error bar and plot them
<https://www.mathworks.com/matlabcentral/answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center#answer_302325 Answer...

alrededor de 8 años hace | 1

Respondida
how to remove image extension so that only numbered name can be stored in a database
n=sscanf(fname,'%d.jpg') or [~,name]=fileparts(fname); n=str2num(n);

alrededor de 8 años hace | 0

| aceptada

Respondida
I have a time series daily data points from Jan-1-2007 to March-31-2011 which is 1642 data points. How to plot the CDF of the same?
Because |ecdf| returns the percentiles at the _*unique*_ locations in the input vector returned in the optional second output va...

alrededor de 8 años hace | 0

| aceptada

Respondida
Spliting a n-by-3 Array into several different arrays.
|v| is _not_ a vector but an array. Star's code works on a vector; would be painful to extend to an array I think, as is. _B...

alrededor de 8 años hace | 0

| aceptada

Respondida
Repeat for-loop from the beginning after recalculating values
Directly addressing the Q?, here's a basic function to do the removal-- function x=thompsontau(x) % Return array x w/ ou...

alrededor de 8 años hace | 0

| aceptada

Respondida
how to specify the X and Y ticklable?
|X,YTick| and |X,YTickLabel| are integrally coupled together -- you must label every tick with a label (or a blank string if don...

alrededor de 8 años hace | 0

Respondida
How to animate line on polar axes plots
polar coordinates are "red-haired stepchildren" in Matlab, for sure. I've not played with the new(ish) |PolarAxes|, but I t...

alrededor de 8 años hace | 1

| aceptada

Respondida
Repeat for-loop from the beginning after recalculating values
The first loop can be eliminated entirely--use the Matlab array syntax: x_31=mean(P31,'omitnan'); SDP_31=std(P31,'om...

alrededor de 8 años hace | 0

Respondida
How to avoid using dynamic variables?
Good on ya' to recognize the futility of the approach! :) See doc splitapply for the general utility function to ap...

alrededor de 8 años hace | 0

Respondida
2 different markers in loop, show both when applicable
if isequal(VEI4lat,[0]) == 0, is equivalent to if VEI4lat~=0 and the block is empty so nothing ever happens for any...

alrededor de 8 años hace | 0

| aceptada

Respondida
Add secondary semilogx axis to linear plots
OK, I _think_ this is close if I understood correctly... % make up some dummy data that sorta' looks similar... phi=-2:2...

alrededor de 8 años hace | 1

| aceptada

Respondida
Insert xticks in bold in existing xticks
You've got to write the same number of tick labels as ticks and place the non-automatic text in the locations desired, explicitl...

alrededor de 8 años hace | 0

Respondida
Row-by-row analysis after establishing a threshold value
A=[0.55 0.45 0.55;0.65 0.75 0.85;0.35 0.95 0.45;0.85 0.15 0.25;0.35 0.25 0.15;0.45 0.45 0.35]; T=0.5; iUnOv=all(A<T,2) |...

alrededor de 8 años hace | 0

Respondida
I'm getting the following error when I try to run some function m-files: Undefined function or method 'eig' for input arguments of type 'intval'.
>> doc eig ... Input Arguments A — Input matrix square matrix Input matrix, specified as a real or comple...

alrededor de 8 años hace | 0

| aceptada

Respondida
How do I remove paired data in a matrix?
A(any(A<0,2),:)=[]; Or, vice versa, keep the wanted-- A=A(all(A>=0,2),:); % keeps 0 as +ive Look up |logical ind...

alrededor de 8 años hace | 1

| aceptada

Respondida
Is there a (convenient) way to find out which Toolbox you need for code written by somebody else in the past?
Unfortunately, "no, not really". One of the real problems in MATLAB design is namespace pollution and with the tremendous proli...

alrededor de 8 años hace | 0

Cargar más