Beantwortet
How to continue loops with few if statement between them
This is nicer without a loop: mean_travel1 = sum(arrival(depart_time < 100,1)); mean_travel2 = sum(arrival(100 < depart_time &...

etwa 4 Jahre vor | 0

Beantwortet
what am i doing wrong in this equation?
There is no need for symbolic calculations or the solve command: [x, y] = meshgrid(0:0.2:4, 0:0.2:4); z = sin(y + 5) + 5 * sin...

etwa 4 Jahre vor | 0

Beantwortet
Find the rows that have common elements for 4 arrays
What about: intesect(intersect(intersect(in1(:,9), in2(:,9)), out1(:,9)), out2(:,9))

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Profiler will not open
Maybe a user-defined function shadows a function used to start the profiler. Try https://www.mathworks.com/matlabcentral/fileexc...

etwa 4 Jahre vor | 0

Beantwortet
understanding the reshape function
reshape changes the dimensions of an array without changing the number of elements or their order. If you provide an empty matri...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
calculate mean for elements of each column in a cell array sub-entry
Of courser you can use mean and sum for double arrays. Why do you think, that this is not possible? cell_array{3,1} = magic(4);...

etwa 4 Jahre vor | 0

Beantwortet
Use fprintf name of array within the script
The main problem is to have a bunch of variables with an index hidden in the name. Don't do this. Store the data in an array. Th...

etwa 4 Jahre vor | 0

Beantwortet
what am i doing wrong in this equation?
From the doc of solve: Support for character vector or string inputs has been removed. Instead, use syms to declare variables a...

etwa 4 Jahre vor | 0

Beantwortet
Assigning multiple outputs from a function to the multiple variables and repeat the same for several inputs to the function
Please read Matlab's Onramp to learn the basics. It is not efficient to repeat the tutorials in the forum. params.N = 2; for i...

etwa 4 Jahre vor | 0

Beantwortet
A really, really strange situation (the same two copies of code on the same computer with the same version of matlab running at very different times)
You have two codes. As far as I can see, you are posting one of them. You mention, that comments and spaces can be different. Th...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to convert all path images folder to one .mat file
Folder = 'C:\Users\hp\Desktop\testing\abood'; FileList = dir(fullfile(Folder, '*.jpg')); Data = cell(1, numel(FileList))...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Faded eps figure in LaTex
Is one a vector graphic and the other one rasterized? This can happen, if the RendererMode of the figure is set to 'auto'. Defin...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Strange result in subtraction operation
format long g a = 4.238257316854621; b = 4.238257316854609; wanted = 1.12e-14; got = a - b drift = max(eps(a), eps(b))...

etwa 4 Jahre vor | 0

Beantwortet
performance: fullfile function execution efficiency could be improved.
Seriously? fullfile inserts file separators on demand, while your code is a simple concatenation of strings. In addition fullfi...

etwa 4 Jahre vor | 0

Beantwortet
how i can convert a matrix in to a column vector and again i need to convert that column vector in to matrix form without disturbing the original pixels position
RGB = rand(640, 480, 3); R = RGB(:, :, 1); G = RGB(:, :, 2); B = RGB(:, :, 3); Rv = R(:); % Vectors for e...

etwa 4 Jahre vor | 0

Beantwortet
Read run-length encoding data from a table
This is one of the files I would not import with readtable, but manually: [fid, msg] = fopen(FileName, 'r'); assert(fid > 0, '...

etwa 4 Jahre vor | 0

Beantwortet
ode45 and rungekutta yield different result
The function to be integrated contains: if abs(vrel)/v_band<0.001 ... if abs(faply)<uS*Fn This looks like th...

etwa 4 Jahre vor | 1

Beantwortet
how to deal with an error with exportgraphics
As the documentation says, the handle must be: axes | figure | standalone visualization | tiled chart layout | ... plot replie...

etwa 4 Jahre vor | 0

Beantwortet
How to define if a point is inside or outside a 3D pyramidal area?
If you have the 4 points of the pyramid given as 1x3 vectors, A,B,C,D,F (by the way, where is E?): % [UNDER CONSTRUCTION! RESUL...

etwa 4 Jahre vor | 1

Beantwortet
Help with unstack function on matlab
According to the documentation of unstack the 3rd input must be a scalar, CHAR vector or string. You provide the vector 1:53 ins...

etwa 4 Jahre vor | 0

Beantwortet
I want to draw graph between "P" and "x" but it is throwing the following error.
Try: fplot(P, [1 6]) % not P(x)

etwa 4 Jahre vor | 1

Beantwortet
error in processing multiple images in a loop code
I assume this was meant: [~, filename, ~] = fileparts(filenames); % ^^^^^ instead of fileinfo

etwa 4 Jahre vor | 0

Beantwortet
Adding a Vector at Certain Points of a Sequence
seq = [1 0 1 0 0 1 1 0 0 1]; signal = [0 0 0 1 2 1 0 0 0 0]; seq = randi([0,1], 1, 1e5); signal = randi([0, 10], 1, 1e2)...

etwa 4 Jahre vor | 0

Beantwortet
How to understand and apply arrayfun - getting intuition beyond the documentation.
You can replace arrayfun by a loop: X = [1, 12; 1, 13; 1, 12; 2, 4; 2, 4; 2, 4; 3, 9; 3, 9; 3, 9]; L = X(:,1); M = arrayfun...

etwa 4 Jahre vor | 3

Beantwortet
Save plots in a for cycle
If you want to create every 2nd image only, simply use: for i = 1:2:sz(3) % ^^ then i is [1, 3, 5, ...] To save the ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
reduce values on a vector
You are overwriting the variable Surveillance_signal_samples repeatedly: for kk =1:nSurv Surveillance_signal_samples=Surve...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to output a new matrix that swaps the position of the beginning and end of a separate matrix
latitude = zeros(1,18); longitude = zeros(1,43); for i=1:18 latitude(i) = 48+(i-1)*1; end for j=1:43 longitude(j)...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Newton to see when the Gradient = 0
In the line: xd=x+d; x is a [2x1] vector and d a [1x2] vector. The implicite expanding replies a [2 x 2] matrix. Maybe this f...

etwa 4 Jahre vor | 0

Beantwortet
How to apply an IIR-Filter correctly on a PCM-Signal?
Yes, this filter reduces the power massively: data = load('handel.mat'); signal = data.y; b = [0.049922035 -0.09...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Dimensions of arrays being concatenated are not consistent.
The message means, that you cannot concatente arrays horizontally, if they have a different number of rows. Or vertically, if th...

etwa 4 Jahre vor | 0

Mehr laden