답변 있음
Randomize a vector with letters making a N back test
s = 'A':'J'; str = s(randi(numel(s), 1, 150)); idx = 5:4:numel(str); str(idx) = str(idx - 3)

4년 초과 전 | 0

| 수락됨

답변 있음
Creating empty txt file
The save() command stores the contents of the current workspace in a MAT file. See: doc save To create an empty text file, use...

4년 초과 전 | 0

| 수락됨

답변 있음
How can I convert a time vector of HH:SS to a decimal?
v = datetime({'03:30', '04:45'}, 'InputFormat', 'HH:mm') hour(v) + minute(v) / 60

4년 초과 전 | 0

답변 있음
Unrecognized function or variable 'mustBeA'.
The function mustBeA was introduced in Matlab R2020b. You are using 2020a. In consequence upgrading the the way to go or write a...

4년 초과 전 | 0

| 수락됨

답변 있음
how to get the answer for x from 3^x=17 ?
x = log(17) / log(3) 3^x

거의 5년 전 | 0

답변 있음
Searching Folder for Variable File Name
Use the functional form: dir(fileName) Omitting the parentheses is equivalent to: dir('fileName') A simplified version of yo...

거의 5년 전 | 0

| 수락됨

답변 있음
Suggest me the best image encryption algorithm
A short answer: AES-CBC. An implementation: key = uint8('myPassword'); data = randi([0, 255], 640, 480, 3, 'uint8'); % Ge...

거의 5년 전 | 0

답변 있음
how to swap some vector value?
% [EDITED] Now working if S has not a multiple of 10 elements: S = 1:25; a = 2; % Move 2 elements b = 10; % in blocks of 1...

거의 5년 전 | 0

답변 있음
Programmatically adjusting editor fontsize does not work
Your code changes the values, which are applied at the next start of Matlab. You can use FEX: CmdWinTool Font = CmdWinTool(...

거의 5년 전 | 0

질문


Why does the speed of histcounts vary so much?
I have a vector with integer or floating point values and want to count the number of occurences. histcounts() uses the lase el...

거의 5년 전 | 답변 수: 1 | 0

1

답변

답변 있음
input the matrix from user
A = input('Please input the matrix like "[1, 2; 3, 4]":'); % Type e.g.: % [1, 2; 3, 4] meanA = mean(A(:)) % Or in modern...

거의 5년 전 | 0

| 수락됨

답변 있음
I would like to hire an explainer
Maybe this is a better point to start: https://www.mathworks.com/services/consulting.html

거의 5년 전 | 1

| 수락됨

답변 있음
Question regarding the smooth filter function when using the Savitzky-Golay method
According to the documentation, the degree can be determined and the window size is replied as 2nd output: % SMOOTHDATA(...,'...

거의 5년 전 | 1

답변 있음
How to document the input from Matlab into the file
Using input in the command window is useful for short hacks only. For real applications either use a GUI and store the inputs by...

거의 5년 전 | 0

| 수락됨

답변 있음
Error evaluating inline function - Not enough inputs to inline function
These linesmust fail: ode45('D:\Kin\Ode.m',tspan, SM0); [Coeff_ODE,Residuals_ODE] = nlinfit(time, conc, 'D:\ Kin\ fitODE', i...

거의 5년 전 | 0

| 수락됨

답변 있음
How to combine matrices
permute(reshape(permute(NETPLP, [2, 1, 3]), 4, []), [2, 1]) All reshaping operations of N-dimensional arrays can be solved by t...

거의 5년 전 | 0

답변 있음
Accelerate executable file speed
See: https://undocumentedmatlab.com/matlab/wp-content/cache/all/articles/speeding-up-compiled-apps-startup/index.html https:/...

거의 5년 전 | 0

| 수락됨

답변 있음
Finding the relation between x and y using the available xy-dataset and interpolation
Import the data using readmatrix and call interp1 for a linear interpolation: yi = interp1(x, y, xi) where xi are the points, ...

거의 5년 전 | 0

| 수락됨

답변 있음
ARRY EXEEDS RANDOM NUMBER
If you request 74.5GB of RAM for a matrix, care for having this size of memory plus some head room. On a 160 GB RAM machine, the...

거의 5년 전 | 0

답변 있음
How to save 30x1 data for 100 loop in Mat.file ?
A simplified version of your code: n = 30; A = rand(n, 2) * 5; DT = [2.5, 2.5]; Value = sqrt(sum((DT - A) .^ 2, 2)...

거의 5년 전 | 0

| 수락됨

답변 있음
What is the alternative function for evalin?
You asked clearly for the runtime of the code. Distributing a variable by evalin() is a drawback, as explained by others already...

거의 5년 전 | 3

답변 있음
Find maximum clique with recursive function
I've reduced the run time from 60 to 2 seconds using this method: Convert the {1 x N} cell array of vectors to a [N x N] logica...

거의 5년 전 | 1

| 수락됨

답변 있음
Excecute computation on push button
With assignin('base','Ac',Ac); you create the variable Ac in the base workspace. If you do not declare this variable as globa...

거의 5년 전 | 1

답변 있음
Close cmd while getting results
What is the purpos of: if toc(timer1)<waiting This not a loop and it does not wait until your command in the system() call is ...

거의 5년 전 | 0

답변 있음
How to return error code from compiled exe, without throwing up dialogue box?
Does this answer still work: https://www.mathworks.com/matlabcentral/answers/100904-how-can-i-retrieve-an-exit-code-from-a-stan...

거의 5년 전 | 1

| 수락됨

답변 있음
In Guide, How to add border
figure; uicontrol('Style', 'Text', 'String', '', 'BackgroundColor', 'k', ... 'Position', [20, 20, 64, 24]); uicontrol('St...

거의 5년 전 | 0

답변 있음
cross product is wrong
Geogebra treats the dta as symbolical expressions. Matlab converts -2159/277 to a numericalvalues as default. If you want to us...

거의 5년 전 | 2

답변 있음
clearing a figure
A simplified version of your code without clf and flickering: x = [0; 0; 6; 6; 6; 0]; y = [0; -3; -3; 0; 3; 3]; z = [0; 0;...

거의 5년 전 | 0

답변 있음
How do I gapfill a vector only if gaps (NaNs) are 10 elements or less?
With FEX: RunLength : x = [1,2,3,5,7,9,10,9, NaN,NaN,5,3,2,NaN,NaN,NaN,NaN,NaN, ... NaN,NaN,NaN,NaN,NaN,NaN,12,13,14,15,16...

거의 5년 전 | 0

| 수락됨

답변 있음
How to force matlab in a loop to always give you scientific/exponential notation?
What about: ax = axes; plot(1:10); drawnow; ax.YAxis.Exponent = ceil(log10(max(ax.YAxis.Limits)));

거의 5년 전 | 0

더 보기