Answered
Extract values from one field of structure, write into array
Why do you call str2double? What is the contents of the 'name' fields? What is the wanted output? Mentioning the type of inputs ...

4 years ago | 2

Answered
Delete all repeatation number
% Your code repeat=[2;6]; a = [1 2 2 3 2 4 5 6 7 8 6] for i=1:length(repeat) a(a==a(repeat(i)))=[] end A small modifica...

4 years ago | 0

| accepted

Answered
How can I recover a accidentally deleted object from GUI_file?
I assume, this is an effect of: imshow(I) As a high-level graphics command (as e.g. plot()), imshow removes all former childre...

4 years ago | 0

Answered
Delete all repeatation number
a = [1 2 2 3 2 4 5 6 7 8 6]; [S, idx] = sort(a(:).'); m = [false, diff(S) == 0]; ini = strfind(m, [false, true]...

4 years ago | 0

Answered
How to plot 2 figures with 2 subplots each ?
Fig1H = figure; Ax1H = subplot(Fig1H, 1, 2, 1); plot(Ax1H, rand(10)); Ax2H = subplot(Fig1H, 1, 2, 1); plot(Ax2H, rand(10))...

4 years ago | 0

Answered
Match two rows value by a column value
index1= strcmp(new_data(:,34),'1', new_data(:,9),'Corn'); This is gun-shot-programming. Please read the documentation of strcmp...

4 years ago | 0

| accepted

Answered
jpeg_read Can't open file error
Work with absolute path names. 'dataset/controlled/FB/QF-50/original-041-1012x1800.jpg' does not include the folder '/home/bojan...

4 years ago | 0

Answered
how to save signals in sequence of numbers in '.mat' form?
for k = 1:20 ... filename = sprintf('Annotation%02d.mat', k) save(filename, ...) end This creates Annotatio...

4 years ago | 1

| accepted

Answered
Concatenate str and int and store it as a vector
A = [761,2,45,65,900]; B = [56,96,368,879,56]; s = 'sample'; sprintfc([s, '_%d_%d'], [A; B].') % Or: compose('sample_%d_%d'...

4 years ago | 0

| accepted

Answered
Copy files based on presence in list
What exactly are "duplicates"? Which of them should be used? What does "removing" mean: from the list or delete the files? List...

4 years ago | 0

Answered
string for x label in a plot
It is not really clear, what you are asking for. But you can set the XTicks and the corresponding lables freely. x = 1:15; y =...

4 years ago | 1

Answered
concat/horzcat for cell with data cells of a*b*c sizes
E1m = reshape(E1, 180, []); E2m = reshape(E2, 180, []); E = cat(2, E1m, E2m); cat(2, ...) is the same as horzcat().

4 years ago | 0

| accepted

Answered
How to add multiplicative noise to audio?
According to the name "multiplicative noise" I'd expect this to work also: t = linspace(0, 5, 5 * 1000); yourSound = s...

4 years ago | 0

| accepted

Answered
How do I split a string using a only *single* whitespace delimiter so any multiple whitespaces are also "split"?
The dull method: s = 'Time Aero Inertial Total'; d = diff(s == ' '); s(d == -1) = '*'; % Start of non-spaces ...

4 years ago | 0

Answered
I don't understand my error
y = @(Ta) -139.34411 + 1.575701e5 ./ Ta - 6.642308e7 ./ Ta.^2 + 1.243800e10 ./ Ta.^3 - ... 8.621949e11 ./ Ta.^4 - Y; g = d...

4 years ago | 0

Answered
How do I change the axis exponent of several subplots at once?
arrayfun(@(axH) set(axH.YAxis, 'Exponent', 3), findobj(gcf,'Type','axes')) Alternatively: AxesH = findobj(gcf,'Type','axes'); ...

4 years ago | 1

| accepted

Answered
Cannot find an exact (case-sensitive) match for 'RRRproject3' !!!
The message is clear. Matlab is case-sensitive. The function call "RRRproject3()" cannot be found, but there is a function calle...

4 years ago | 0

Answered
How does seperate script tell compiled GUI its done
The solution is trivial: Just add some code to show the progress. Your code was fine and efficient: app.ProgressField.Value = "...

4 years ago | 0

| accepted

Answered
Integral as part of a function
% As anonymous function: f = @(x) integral(@(t) 2 * sqrt(0.0625 - t.^2), -0.25, x - 0.25) / 0.0981747704247; f(13) % As funct...

4 years ago | 0

| accepted

Answered
How can I split a cell that contains two different cells and store them with two different names?
Your example does not need a FOR loop, but the solution is trivial: A = {{55 55 44; 44 66 22} {44 22 00; 82 65 12}}; B1 = A{1...

4 years ago | 0

| accepted

Answered
Can you help me draw the plot with decimals?
I1(i/n) = ... This cannot work. i/n is not an integer and therefore not possible as index. Remember what indices are: X(k) ...

4 years ago | 0

| accepted

Answered
Is it possible to go through the elements of an array without resorting to length in a for loop?
Yes, this works: a = [1,2,3]; for i = a if i > 2 fprintf('%d is greater than 2\n', i) end end Notes: It ...

4 years ago | 2

Answered
calculating the mean for each column in a numerical array based on the elements in column 1
With a simple loop: A = [randi([1, 198], 8167, 1), rand(8167, 10)]; result = zeros(198, 11); for k = 1:198 match ...

4 years ago | 1

| accepted

Answered
why I can't work with the optimization Toolbox?
ver tells you, if the toolbox is installed. This shows, if you have an active license for this toolbox: license('test', 'Optimi...

4 years ago | 0

| accepted

Answered
Logical indexing cell array
A hint: I takes some time to create your input data such, that it can be used in an example. Please do such tedious editing by y...

4 years ago | 0

| accepted

Answered
how I can create matrix of amout of fun after for loop ???
Maybe you mean: na = 10; a = linspace(-5,5,na); b = [-3 -1 2 3 4]; nb = numel(b); options = optimoptions('ga','Display','...

4 years ago | 0

| accepted

Submitted


MatlabRelVer(S)
Get name of release and version of Matlab

4 years ago | 1 download |

0.0 / 5
Thumbnail

Answered
How to set up the axes of a binary Image?
out = rand(241, 321) > 0.6; % Binary image axes('NextPlot', 'add', 'XLim', [-1600, 1600], 'YLim', [-1200, 1200]); x = linspac...

4 years ago | 0

Answered
How can I add a greek symbol with a circumflex for labeling an axsis in a diagram: xlabel("\theta") but i additionaly want a ^ above the theta?
xlabel("$\hat\theta$ or $\widehat\theta$ ", ... 'Interpreter', 'LaTeX', 'FontSize', 20)

4 years ago | 0

Answered
How can I get a variable name to include a string of text?
Read Stephen23's hints carefully, because they are valuable. Storing important information in the names of variables is a progr...

4 years ago | 1

Load more