답변 있음
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);...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 1

| 수락됨

답변 있음
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))...

거의 4년 전 | 0

| 수락됨

답변 있음
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...

거의 4년 전 | 1

| 수락됨

답변 있음
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))...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 0

답변 있음
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, '...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 1

답변 있음
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...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 1

답변 있음
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...

거의 4년 전 | 0

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

거의 4년 전 | 1

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

거의 4년 전 | 0

답변 있음
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)...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 3

답변 있음
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 ...

거의 4년 전 | 0

| 수락됨

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

거의 4년 전 | 0

| 수락됨

답변 있음
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)...

거의 4년 전 | 1

| 수락됨

답변 있음
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...

거의 4년 전 | 0

답변 있음
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...

거의 4년 전 | 0

| 수락됨

답변 있음
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...

거의 4년 전 | 0

답변 있음
Create cell array of handle functions, which have been created from 2x1 double arrays
a = [1; 2]; b = [3; 4]; f = cell(2, 1); for ff = 1:2 f{ff} = str2func(sprintf('@(t) %d * t + %d', a(ff), b(ff))); end f

거의 4년 전 | 0

| 수락됨

답변 있음
changing the legend line style (":","-","--","-.") for 4 black lines in plot instead of using multip colour
figure; axes('NextPlot', 'add', ... 'LineStyleOrder', cellstr([":", "-", "--", "-."]), ... 'ColorOrder', zeros(1, 3))...

거의 4년 전 | 0

답변 있음
Finding Sequences of 1's values
Some timings of the methods provided in this thread: x = randi([0, 1], 1, 80000); format long g disp(timeit(@() Jos(x))) d...

거의 4년 전 | 0

답변 있음
unix/system comand Always print out some environment setting when using it
% Without semicolon: system('pwd') % With semicolon: system('pwd'); % With semicolon and catching outputs: [status, out] = ...

거의 4년 전 | 0

답변 있음
Is there a reason why row vectors are default in Matlab?
Matlab was developped as "Matrix Laboratory". So the default type is a double matrix. If the focus has been set to vectors, it w...

거의 4년 전 | 0

더 보기