已回答
Cannot understand error message --- Invalid MEX-file
Recent versions of Matlab changed their version of _libstdc++.so_ with all the associated fun that implies. It sounds like it is...

8 years 前 | 3

已回答
How to pass a variable to a UNIX command, e.g. sed inside a matlab script?
I don't think _sed_ is integrated to Matlab so, yes, you'd need a _system()_ call. The power of _regex_ is directly at your h...

8 years 前 | 0

已回答
Remove consecutive 1's if there are more than x in a row, and if there are less than z in a row
x = [0 1 0 0 1 1 0 1 1 1 0 1 1 1 1 0]; result = regexprep(num2str(x), '(?<=(0\s+ | ^))(1)(?=(\s+0 | $)) | (1\s+){4,}' ,'') - ...

8 years 前 | 0

已回答
Summing few sequences in a vector
Not particularly efficient but fulfilling the eternal quest for one liners: result = cellfun(@(x) sum(x((x - '0') > 0 & (x -...

8 years 前 | 0

已回答
take out numbers from string
I'll get you started: data = [{'10.0.7.4:22->10.0.8.5:26856'};{'10.0.13.4:22->10.0.12.5:9997'}]; result = cellfun(@(x) reg...

8 years 前 | 0

已回答
Surf with one specific gridline?
Is this what you mean? aH = axes; plot3(rand(10,1)*0.32-0.02,rand(10,1)*.32-0.02,rand(10,1)*.32-0.02); hold on xli...

8 years 前 | 0

| 已接受

已回答
Change image automatically in a GUI after a certain time
<https://se.mathworks.com/help/matlab/creating_guis/automatically-refresh-plot-in-a-guide-gui.html>

8 years 前 | 0

已回答
I want to find earth mover's distance for two histograms.How do I do that?
<https://se.mathworks.com/matlabcentral/fileexchange/22962-the-earth-mover-s-distance Google is your friend>

8 years 前 | 0

已回答
How to remove the connecting live between two standard deviations in a bar plot
One option: errorbar([Mean_RMS_COMFB_tr3;Mean_RMS_LMTFB_tr3], [Std_RMS_COMFB_tr3 Std_RMS_LMTFB_tr3], 'r.'); Please read t...

8 years 前 | 0

| 已接受

已回答
Extracting number from a string
result = 'M1' - '0'; result(result < 0 | result > 9) = [];

8 years 前 | 3

已回答
Extract numeric value from a cell in a table.
C = strsplit(T{1,1}) your_val = str2num(C{1});

8 years 前 | 0

已回答
I need to analyze data from csv file in Matlab. Since csv file is large Matlab struggles with compilation. What can I do to make it more efficient?
Ouch! Don't call _xlsread_ inside a loop. You're always opening the same file, as far as I can see. Just load once and read f...

8 years 前 | 1

| 已接受

已回答
i want to plot this without ignoring the img parts, what should i do ?
There's some spurious looping in your code. You might want to look into that. But that's another question. To answer what you sp...

8 years 前 | 0

已回答
How draw an ellipse by acquiring points in 3D
Adapt to your needs: z = [0.5,1]; fx = @(x) sin(x); fy = @(x) cos(x); t = linspace(0,2*pi,101); plot3(f...

8 years 前 | 0

已回答
why do i have so many errors when trying to use particle swarm optimisation in matlab?
_T_, and consequently _fun_ expect two arguments. From the documentation of particle swarm: "Objective function, specified a...

8 years 前 | 0

| 已接受

已回答
How to make for loop to make various mathematical operations. Using matrices.
your_array = magic(5); %don't use a built-in function as a variable name your_result = bsxfun(@rdivide,your_array, sum(your_...

8 years 前 | 0

已回答
Plot cell array content
data = {rand(1,9), rand(1,49), rand(1,99)}; hold on cellfun(@(x) plot(x), data)

8 years 前 | 0

已回答
How to remove rows?
You don't need to loop A(sum(A < 3540, 2) == 15,:) = [];

8 years 前 | 0

| 已接受

已回答
How to use loop in Anonymous functions?
No need for a loop. You could define _diagsum_ as follows, which should work for any square array: n = 5; values = rand(...

8 years 前 | 0

| 已接受

已回答
Randperm for decimals/below 1
result = rand(16,1) .* 1.3;

8 years 前 | 1

| 已接受

已回答
value of variable is changed in iteration
Is this what you are trying to do? a=[2 2.8]; b=[2.8 3]; c=[2.5 3]; d=[2 2.8]; e=[2.5 3]; f=[2.8,3]; g=[2...

8 years 前 | 1

| 已接受

已回答
From a cell to an array (besides cell2mat)
C = {[1] [2 3] [4 5 6]} result = [C{:}]

8 years 前 | 1

已回答
How to find intermediate points and plot following problem in MATLAB?
Much more efficient and actually yielding all possible combinations: N = 101; x = linspace(0,0.5,N); %---------------...

8 years 前 | 1

| 已接受

已回答
how to read a gps Rinex observation and navigation files in matlab directly
No need to <https://github.com/manromao/RINEX-reader reinvent the wheel>

8 years 前 | 0

已回答
place value for elements which not in transition probability matrix.
qq= [1 3 3 4 1 5 4 6 3] ; [unik, ia, ib] = unique(qq,'stable'); subs = [ib(1:end-1) , ib(2:end)]; your_result...

8 years 前 | 0

已回答
How to perform data analysis on each column of matrix individually and plot each column individually?
data = rand(100,5); %Loop through the columns for ii = data %do your thing: ii is a column vector containing the ...

8 years 前 | 0

已回答
How can i prove Runge-Kutta method depends on time steps?
No, a variable-step size is *always* used for _ode45_ as per the documentation. The Mathworks support team has provided code ...

8 years 前 | 0

| 已接受

已回答
how can i create a pdf report with both portrait and landscape orientation?
You could always try a <https://se.mathworks.com/help/matlab/ref/system.html system> call to <https://www.pdflabs.com/tools/pdft...

8 years 前 | 0

已回答
Curve fitting f(x,y) result
<https://se.mathworks.com/help/matlab/data_analysis/linear-regression.html Linear regression>

8 years 前 | 0

已回答
I would like to know the algorithm to compress a txt
<https://se.mathworks.com/help/matlab/ref/zip.html zip>

8 years 前 | 0

加载更多