Réponse apportée
delete row in matrix if value in another matrix is unique
you want to delete entries when the number is repeated first? firstVec=[5 3 5 1 7 9 3 1 4]; secVector=1:numel(firstVec) [~,...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Extracting only some cell arrays from a cell- based on a double array
something like this: yourCell=cellstr(num2str((1:29)'))' someOfThemIdx=[ 1 3 15 19 20 29]; someOfThem=yourCell(someOfThemIdx)...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Return values from uifigure by pressing OK button
if you nest functions in functions, you can directly use the defined variables. note also the uiwait to wait for the functio nre...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How do I create a graph similar to that of the example below?
you could do like this loglog([ 10^2 10^2 10^4 10^4 10^2],[ 10^4 10^6 10^6 10^4 10^4]); hold on; loglog([ 1 10^2 10^4 10^4],[...

presque 4 ans il y a | 0

Réponse apportée
How to create image from arrays by random themself ?
a = [119 79 76 101 119 99 72 77 94 82 76 84 92 86 63 54 45 47 59 69 56 59 52 48 48 41 41 38 41 42 38 42 36 30 35 17 23 29 29 31 ...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
How to find column where 0 turns to 1 for each row
yourMat=[0 0 0 0 0; 0 1 1 0 0; 0 0 0 1 0]; where=arrayfun(@(idx)find(diff(yourMat(idx,:))==1,1,'first')+1,1:size(your...

presque 4 ans il y a | 0

Réponse apportée
Printing figure alters content details
couldn't find a professional solution for this, but here is a ugly one by including the colormap as pixel values. imwrite should...

presque 4 ans il y a | 0

Réponse apportée
using multiple else if
the reason the variables are not recognized is, that the depending on your if clause, another variable is created (the created v...

presque 4 ans il y a | 0

Réponse apportée
Warning: Unable to play audio because no audio outputs were found.
anything new on this topic? can't make matlab to play sounds again, there are audio devices available, resetting/rehashing has n...

presque 4 ans il y a | 0

Réponse apportée
how to return cell array with varargout?
if i understand you cirrectly, you want as dynamic output variable varargout, and each of the given should/can be a cell itself ...

presque 4 ans il y a | 0

Réponse apportée
How to make an image appear in different locations
you can try this raw code, how often the image can change the position is defined in the function close all; clear all; im=im...

presque 4 ans il y a | 0

Réponse apportée
How to extend sendmail wrapping
type edit sendmail and look into function toSend = formatText(msgText) there you can find the line maxLineLength = 75; wh...

presque 4 ans il y a | 1

| A accepté

Réponse apportée
Default interactions during buttondownfcn for geoaxes ???
yes, the defaultInteraction is disabled when you set a window function like the buttondwnfcn. However, it is reenabled if the ca...

presque 4 ans il y a | 0

Réponse apportée
Operator '-' is not supported for operands of type 'table'
try e.g. (Quat{i}{2:end,:} - Quat{i}{1:end-1,:})./(Time{i}{2:end}-Time{i}{1:end-1})'; instead of (Quat{i}(2:end,:) - Quat{i}(...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
create a sparse multidimensional matrix
you can try this: myData=[1 2 3 4; 5 6 7 8; 9 10 11 12]; % get sizes dataChunkLength=size(myData,...

presque 4 ans il y a | 0

Réponse apportée
My code is keep plotting the wrong data
may the scatter3() command is suffiecient to visualize your data, you interpolate (e.g. interp3) your XYZ data to generate more ...

presque 4 ans il y a | 0

Réponse apportée
Step-by-step calculation of rectangular window
or you use the movsum function fs=10000; t=0:1/fs:3; tau=0.25; tauInSamp=tau*fs; spikeTimes= randi(numel(t),10,1); % generat...

presque 4 ans il y a | 0

Réponse apportée
Step-by-step calculation of rectangular window
i suggest you just add the rectangular window at the specified times given by the spices and the spice amplitude: fs=10000; t=...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
how to concatenate two tables efficiently
before concatenation you can go trough all tables and add up the number of rows. Then preallocate the table using three columns ...

presque 4 ans il y a | 0

Réponse apportée
let a script run in other script with variable parameters
it really sounds like you actally should change your script to a fcuntion. Running a script giving paramters to it is exactly wh...

presque 4 ans il y a | 1

Réponse apportée
How to print value from Structure in MATLAB
you can access the 4 doubles in the cell StagPRFValue by e.g. CombineOutput(1).ValueStructure.StagPRFValue{1} the other two ...

presque 4 ans il y a | 0

Réponse apportée
Interpolating points in a 3D space with one line
have a look into the polyfitn() function on FEX

presque 4 ans il y a | 1

Réponse apportée
Call a function within an if statement
try randomtasks(n)==1 i guess without the (n) you would compare a vector to a value e.g. [1 3 2]==1 which is not true and th...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
need help for understanding audio compression code using dct
it shows, how a sound could sound if you transmit only 128 dct values per block instead of 512 sound values per block % read au...

presque 4 ans il y a | 0

Réponse apportée
How to plot the average wavelet magnitude over range of frequencies
why not use the output of the cwt function? you can average it yourself: load mtlb t=(0:numel(mtlb)-1)/Fs; [wt,f,coi]=cwt(m...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Find the width of a peak
do you just want to measure the peak width of this data set only? if yes, i should be telatively easy locating the peak with min...

presque 4 ans il y a | 0

Réponse apportée
Resampling vector to have homogeneous length between trials
you can use the interp1() function to produce an equal number of samples per jump

presque 4 ans il y a | 0

Réponse apportée
how to clean data by deleting [0 0]
use rowsToDelete=~any(AB,2); or rowsToDelete=all(~AB,2); AB(rowsToDelete,:)=[]; or rowsToKeep=any(AB,2); AB=AB(rowsToKeep...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Finding the max value in 1st column of values based on a range in the 2nd column of values
max(yourMat( yourMat(:,2)>0.09 && yourMat(:,2)<0.11 ,1)) for the first range and so on?

presque 4 ans il y a | 0

Réponse apportée
Find rising and falling point
you can identify those points using a threshold for the differential signal, something like find( abs(diff(x)) > someThreshol...

presque 4 ans il y a | 1

Charger plus