답변 있음
Masking out unwanted data
A = [1 0 1]; B = [2 5 6]; C = B(A ~= 1) % Or: B(A == 1) = 0

거의 4년 전 | 0

| 수락됨

답변 있음
multiple condition sumif without loop
Start with avoiding repeated work: XMatrix = zeros(length(UniqueDates), height(UniqueConc)); % Pre-allocate!!! xCredit = X.Ac...

거의 4년 전 | 1

| 수락됨

답변 있음
Internal Matlab function not found (isnan)
Try: restoredefaultpath

거의 4년 전 | 0

답변 있음
How to divide a 2d array into blocks and create an array with the mean value of each block?
B = [1 3 4 3 10 0 3 4; ... 5 7 2 NaN 8 2 3 4; ... 8 4 6 2 NaN 3 5 7; ... 2 2 5 5 1 NaN 4 4]; B = repmat(resha...

거의 4년 전 | 0

| 수락됨

답변 있음
Set x-axis tick labels in subplots
Avoid gca if you can get the axes handle directly: axesH = subplot(5,2,4); plot(axesH, DateFour, Four+Pedsfour); Why do you ...

거의 4년 전 | 0

답변 있음
How to change figure image to jpg image (image undistortion)
img = imresize(I,0.5); imwrite(img, 'YourImage.jpg')

거의 4년 전 | 0

답변 있음
Je rencontre un problème avec mon code. Je n'arrive pas a reconstituer une image. Avez-vous une idée de ce qui cloche avec mon code? Merc.
While the huge block of data do not matter in any way, the problem is found inside the code: fid = fopen('img2.jpg', 'w'); fwr...

거의 4년 전 | 0

답변 있음
how can i install borland for mexfile?
mex -setup create a ".bat" file, which has the syntax of a Windows batch script, but is interpreted by PERL - one of the strange...

거의 4년 전 | 1

| 수락됨

답변 있음
Not enough input arguments.
f_m = @(t,y) mu*(y-cos(t))-sin(t); f_m is a function with 2 inputs. y_m(i)=(4.*y_m(i-1)-y_m(i-2))/3+(2/3).*h*(3*f_m(t(i))) % ...

거의 4년 전 | 0

답변 있음
How to save a matrix from the workspace to my computer as a dat file?
folder = 'D:\Your\Outputfolder'; file = fullfile(folder, 'yourFile.dat'); [fid, msg] = fopen(file, 'W'); assert(fid > 0, ms...

거의 4년 전 | 1

| 수락됨

답변 있음
Index exceeds the number of array elements. Index must not exceed 2.
for i=3:n y_m(i)=y_m(i-2)+2.*h.*f_m(i-1); % <-- This is line 16 f_m(i)=20.*(y_m(i)-cos(t(i)))-sin(t(i)); % ...

거의 4년 전 | 0

| 수락됨

답변 있음
matlab function to find a similar signal in data
Do you want to get something like this: x = rand(1, 10000); y = x(300:400) + (rand(1, 101) -0.5) * 0.01; % A small part with ...

거의 4년 전 | 0

답변 있음
For loop for Sine wave function
The warning is solved is solved by a pre-allocation. Insert before the loop: T = 5; ´ % size of window fs = 44100;...

거의 4년 전 | 0

답변 있음
Operate on 3d matrix based on 2d logical
A = rand(10000, 60, 60); B = rand(60, 60) < 0.5; % logical AA = reshape(A, 10000, 360); C = AA(:, B) * 3; Afterwards y...

거의 4년 전 | 0

답변 있음
json encode/decode
Does the encode of Matlab's production server help? a = [1,2,3] j1 = jsonencode(a) a1 = jsondecode(j1) j2 = mps.json.encode(...

거의 4년 전 | 0

답변 있음
How can I export data set from Matlab to excel ?
The maximum number of rows in Excel is 1'048'576, while it can work with 16'384 columns. This means, that you cannot store vecto...

거의 4년 전 | 0

답변 있음
have array entries filled depending on their indices?
The code is strange, because all elements of A are 0 except for the first one. B(1) is zero, so prod(B(1:n)) is zeros also. Mayb...

거의 4년 전 | 0

답변 있음
How can i read images for filtering using if else condition in GUI?
imfilter operates on the pixel values of an image. See: imfilter . There is no "parent" property, so simply omit this: % XG1 = ...

거의 4년 전 | 0

답변 있음
for loop is endless
ST1 = zeros(1, 10000); % Pre-allocate for k = 1:10000 ST1(k) = sadj * exp(r-0.5*(vol^2)) * T + vol * sqrt(T) * randn(k); ...

거의 4년 전 | 0

| 수락됨

답변 있음
Solution Codes of Ordinary Diferenatial Equation
What is the purpose of the outer loop "for p=1:k"? Why does the inner loop "for n=0:p-2" run from 0 to p-2? It is confusing tha...

거의 4년 전 | 0

답변 있음
Problems accessing files from code after moving a matlab project from uni pc to home
Do not call fopen without checking for errors: [fid, msg] = fopen(file, 'r'); assert(fid > 0, 'Cannot open file for reading: %...

거의 4년 전 | 0

답변 있음
How to sort a dot indexed array by rows based on one column
[~, index] = sort([pop.F]); pop2 = pop(index);

거의 4년 전 | 0

| 수락됨

답변 있음
how to use read variable
T = readtable('Population_data.xlsx'); population = T{:, 3};

거의 4년 전 | 0

답변 있음
How can I create a plot with two different yaxis, with one of them inside the figure?
Simply create 2 axes: FigH = figure; Axes1H = axes(FigH, 'Position', [0.1300 0.1100 0.5 0.8150], ... 'Box', 'on'); ...

거의 4년 전 | 0

| 수락됨

답변 있음
Best way to initialize different parameters based on the machine in which I run the code
Matlab's setpref and getpref command is very useful also to store machine specific parameters. A drawback is, that these settin...

거의 4년 전 | 0

답변 있음
i want to Write a user-defined function that calculate total marks, out of 100,The course should include homework, midterms, and final exam and i dont know why didint work
if (95 >= Gall) Read this loud: "If 95 is greater than Gall". No, you want the other way around: if Gall >= 95 The ...

거의 4년 전 | 0

답변 있음
How to filter the following vector from multiple vectors?
Maybe: V = MM(:, abs(MM(2, :)) < 32); [~, index] = min(V(1, :)); W = V(:, index)

거의 4년 전 | 0

답변 있음
Within a script, can I close or redirect a Windows File Explorer window opened with 'winopen'?
You could open a tree view to the folder inside Matlab: [mtree, container] = uitree('v0', 'Root','C:\') % Still working? This...

거의 4년 전 | 0

| 수락됨

답변 있음
Two complex matrix can not to multiply by each other.
Try this: https://www.mathworks.com/matlabcentral/answers/1584284-the-problem-of-conv2-with-blas-loading-error

거의 4년 전 | 0

답변 있음
Compare two string arrays with a if loop
A simpler formulation of your question might be: Datenbank = [ ... "Na,Pb" "Abellaite" ""; ... "...

거의 4년 전 | 0

| 수락됨

더 보기