Respondida
Select matrices with nonzero rows from a bigger matrix ?
Any number of these kinds of Q? on Answers -- under "runs" or any number of other terms...but, it's pretty simple to code from s...

más de 6 años hace | 1

Respondida
Unrecognized function or variable 'filenames'. Error in pengujian_sistem (line 4) jumlah_data = numel(filenames);
filename = dir(fullfile(image_folder, '*.jpg')); jumlah_data = numel(filenames); You returned the variable filename (singula...

más de 6 años hace | 0

| aceptada

Respondida
What is going wrong with this code
Alternate solution: ix=kron([1:numel(0:13)/2].',ones(2,1)); n=accumarray(ix(c+1),ones(size(c))); >> n n = 14 15 ...

más de 6 años hace | 0

Respondida
What is going wrong with this code
>> n=arrayfun(@(i1,i2) sum(iswithin(c,i1,i2)),0:2:13,1:2:13) n = 14 15 10 14 14 17 16 >> type iswithin ...

más de 6 años hace | 0

Respondida
Finding common values in a matrix and create a chain
Same idea, different cat skinned to get there... u=unique(A(:,2:end)); % look for the...

más de 6 años hace | 0

Respondida
How can I perfom an interpolation?
time = linspace(-1, 1, N); frames = cat(4,zeros([size(codeAlpha),numChannels,bufferSize])); for i = 1:length(time) frames...

más de 6 años hace | 0

Respondida
Is it possible to use a subplot grid to obtain as good or better resolution than that provided by the stackedplot function?
I've never tried to build anything with that many traces as separate subplots but I don't see why you couldn't have the same res...

más de 6 años hace | 0

| aceptada

Respondida
Convert different datetimes into one format
Bestest would be to fix the input source to use the same format but you can try some subterfuges to see if you can sneak by with...

más de 6 años hace | 0

| aceptada

Respondida
Hat on letter on x/ylabel WITHOUT using LaTeX?
figure, plot(sort(rand(10,4))) % preliminaries... % engine hTxt=text(4,0.6,'x'); % location arbitrary for given dat...

más de 6 años hace | 0

| aceptada

Respondida
How to delete the first 2 rows (Headers) of a txt file ?
Well, once you've got the right content in memory, then just rewrite the file. But, specifically on that has some bearing on th...

más de 6 años hace | 0

| aceptada

Respondida
touchstone file could not be processed in matlab
For your specific data file in order to not have to modify the file, the following should return the data in usable fashion... ...

más de 6 años hace | 0

| aceptada

Respondida
How to delete the first 2 rows (Headers) of a txt file ?
Or, readtable. But, starting with the above simply file=regexp(fileread('data.txt'), '\r?\n', 'split') .'; file=file(3:end); ...

más de 6 años hace | 0

Respondida
Merge vector to matrix
In what form do you have the data to start with? If it's a file with the content of the document shown, then just read the file...

más de 6 años hace | 0

Respondida
How can I use different sizes with text
Ayup...except you'll have to either write as a loop using sz(i) for each since 'fontsize' at the command level is global to all ...

más de 6 años hace | 0

| aceptada

Respondida
Error while using a function.I need parentheses in the function header but it wont allow me to do it.
No, don't need any parens (and remove the semicolon, too) in the function dummy argument list, those are surrogate names for the...

más de 6 años hace | 2

Respondida
How can I colour in different colours 2 rows of ylabel using Latex as interpreter?
Well, it finally dawned on me how to work around your particular wish... hTxt(1,1)=text(-0.1,0.55,{'$\tilde{\mu}_c$'},'Interpre...

más de 6 años hace | 1

| aceptada

Respondida
Find the last NaN value in cell array and compare it with the next column
Yeah...the nonnumeric content of the cells containing hex strings changes things...those all return a logical array and not just...

más de 6 años hace | 1

| aceptada

Respondida
Multiply nth elements of an array by an element of a different array?
I'll presume the answer to Cyclist's 2nd Q? is to be unchanged...and the other is just using different variables for the posting...

más de 6 años hace | 1

| aceptada

Respondida
Replace a single character with a new line in a string
>> s= 'hello there how are you today'; >> strip(split(s,'w')) % if the location is a known character... ans = 2×1 cell ...

más de 6 años hace | 0

Respondida
normcdf: speed impact by vectorization
Yeah, there is... -- >> a = -50:0.01:50; >> total_cnt = 10000; >> a_mod = repmat(a, 1, total_cnt); >> whos a a_mod Name ...

más de 6 años hace | 0

| aceptada

Respondida
using fsolve when the function handle takes in 2 variables that are both vectors
Recast as 4-vector w/ v(1:2) -- x; v(3:4) -- y: fun2=@(x) [exp(-exp(-(x(1:2)+x(3:4)))) - x(1:2).*(1+x(1:2).^2); ... ...

más de 6 años hace | 0

| aceptada

Respondida
How to create a vector which displays the letters used in an already existing string?
>> unique(erase(s,' ')) ans = 'adehijlmnosuwy' >> unique(erase(s,' '),'stable') ans = 'helomynaisjwdu' >> >> uni...

más de 6 años hace | 0

Respondida
Multi-colored tick labels in bold, redux
Looks mostly to be the choices for the rgb triplets aren't very distinctive, but a contributing factor is there just aren't many...

más de 6 años hace | 0

| aceptada

Respondida
averaging values in a table in succession
t=readtable('nim123.xlsx'); % read the data t(all(isnan(t{:,:}),2),:)=[]; % remove the blank lines at beginning...

más de 6 años hace | 1

| aceptada

Respondida
put a missed data in a cell
If you build the cell content, there's no reason shouldn't be able to just assign it to the cell array where it belongs. Then j...

más de 6 años hace | 0

| aceptada

Respondida
[DEPRECATED] What frustrates you about MATLAB?
Why can't MATLAB/TMW figure out to not open new figure default inside command window space so the next command to put on some am...

más de 6 años hace | 0

Respondida
How to plot z values against year in x-axis and months in y-axis?
[Y X]=meshgrid([1:12],tRAIN.YEAR); contour(X,Y,tRAIN{:,2:end}) yticklabels(tRAIN.Properties.VariableNames(2:end)) Just for co...

más de 6 años hace | 0

Respondida
Calculating average of cell arrays
mnTemp=cellfun(@(t) mean(t.precip),SAMPLE); with the sample dataset: >> cellfun(@(t) mean(t.precip),SAMPLE) ans = 27.898...

más de 6 años hace | 1

| aceptada

Respondida
How to export the result of the function fit to a file?
It's not a symbolic object, nor a function--it's a cfit object. It has associated methods and the default method is to evaluate...

más de 6 años hace | 2

| aceptada

Respondida
Setting certain edges of a graph a different color
You mean like the following: subplot(2,1,1) plot(rand(10,1)) title('default -- top/bottom outlined w/ box on') subplot(2,1...

más de 6 años hace | 0

Cargar más