답변 있음
Stop an infinite loop with a key
You delete the waitbar in the first iteration: delete(hWaitbar); Remove this line. or move it behind the loop. I cannot imagi...

거의 4년 전 | 0

| 수락됨

답변 있음
Href hyperlink, how to escape double quotes " ?
I'm curious: % [UNTESTED] [TYPO FIXED] disp(['<a href="matlab:system(', ... 'strrep(''explorer.exe /select, $C:\My folde...

거의 4년 전 | 0

답변 있음
How to have different scales in the same x axis?
Set the XTickLabels accordingly with fake XTicks: X = [1,2,3,4,5,6, 100]; Y = rand(size(X)); axes('NextPlot', 'add', 'XTick',...

거의 4년 전 | 0

답변 있음
Grouping the Elements of the Array
x = rand(897880, 1); nx = numel(x); len = 300000; tile = [repelem(len, floor(nx / len)), rem(nx, len)] xC = mat2cell...

거의 4년 전 | 0

답변 있음
Can I run matlab, interacting with its GUI, on another PC?
This sounds like a job for the Parallel Server: https://www.mathworks.com/help/matlab-parallel-server/index.html?searchHighlight...

거의 4년 전 | 1

답변 있음
[Beginer] How can I change a loop which depends on file's time into a one which depends on name's files ?
As far as I understand, you want to process a list of files in alphabetical order. This is the order replied by dir(), but unfor...

거의 4년 전 | 0

답변 있음
how to shift a subscript upwards in Matlab plot legend?
plot(1:10) legend('$V_c$', 'Interpreter', 'latex', 'FontSize', 15) figure plot(1:10) legend('$V_{\raisebox{1ex}{c}}$', 'In...

거의 4년 전 | 0

답변 있음
Why am I not getting desired output?
neural_circuit function neural_circuit h = 0.05; t = 1:h:500; y0 = [2.5, 3.6, 9.5, 8.8, 2, 3, 7, 7.5]; % t(1) =0; y = ...

거의 4년 전 | 0

답변 있음
How to zero out short non-zero regions in vector?
With FEX: RunLength : A = [4 5 6 5 0 0 5 6 2 0 3 4 6 7 8 0 4 5 0 0 0 7 2 1 9 9 0]; minLen = 3; [b, n] = RunLength(A == 0); ...

거의 4년 전 | 0

답변 있음
How can I scan sets of multi variable in a simple version?
Take into account rounding errors: testing for cross(x,y)==0 is not stable. Remember, that the output of cross is a vector. So m...

거의 4년 전 | 0

답변 있음
How to write this formula in Matlab
Ufin = sqrt((1 / n * sum(Ustat .^ 2))^2 + Ucalib .^ 2)

거의 4년 전 | 0

답변 있음
how to sum cell elements in a dynamic cell table
Maybe: A = num2cell([1:6; 2:2:12; 3:3:18]); % Some test input S = size(A); % Size of the input ini = ones(1, S...

거의 4년 전 | 0

| 수락됨

답변 있음
why is this Matlab Code faster than the C++ code below? I want to understand what Matlab internally does better and faster than C++
Not an answer, but an improvement of the Matlab code, which run in 10.7 sec on my R2018b i5m instead of 13.0 sec of the original...

거의 4년 전 | 1

답변 있음
Hi every body, I write this code and I want to find a new Sol and Soll in iteration 1000 or more but the problem that the answer go to Nan?!
Use the debugger to find the iteration, which causes the NaNs: dbstop if naninf Then Matlab stops, when the first NaN occurs. ...

거의 4년 전 | 0

답변 있음
Why is saveas() changing my image aspect ratio?
Try to set the 'PaperSize' property of the figure.

거의 4년 전 | 0

답변 있음
precision of double variables
Welcome to the world of numerics with limited precision. These are the expected effects. You observe the value mentioned in the...

거의 4년 전 | 0

답변 있음
Summation of every nth column
S = size(LoadProfile); X = reshape(LoadProfile, S(1), 4, S(2) / 4); X = reshape(sum(X, 2), S(1), S(2) / 4).'; Result = X(:);

거의 4년 전 | 0

답변 있음
Why am I getting the error "not enough input arguments"?
The function handle provided to fminsearch must accept 1 input argument. fminsearch cannot guess, that H0 should be provided als...

거의 4년 전 | 0

답변 있음
Log Error and Warning Messages to Text File
You can catch errors using try-catch and write the messages whereever you want. Redirecting warnings is more tricky. I use my o...

거의 4년 전 | 0

답변 있음
All tables being vertically concatenated must have the same number of variables.
I assume you want an "outer-join": https://www.mathworks.com/help/matlab/ref/outerjoin.html Output = table(); for kk = 1:nume...

거의 4년 전 | 0

답변 있음
Integration approximation with function handle
f = @(a,b,h,f0) ((a+(n-1)*h+a+n*h)/2)*f0; This cannot work if f0 is a function handle. This is at least confusing: for n=1:n ...

거의 4년 전 | 0

답변 있음
why do I get -Inf
alpha = 0.5; u0 = 0; a_k = @(k) (k + 1)^(1 - alpha) - (k)^(1 - alpha); n = 100; a = 0; b = 1; h = (b...

거의 4년 전 | 1

| 수락됨

답변 있음
generate an independent seed with a fixed number
rng('default') is the default seed at the start of the Matlab session. All subsequent requesrts of random numbers move the see...

거의 4년 전 | 0

답변 있음
imshow is not working
You have created a script called "image.m". This shadows the built-in function image. Shadowing built-in functions is a serious...

거의 4년 전 | 0

답변 있음
Can parfor be used in this context?
"Can I use parfor in a context where the second iteration depends on the results of the first iteration." No, you can't for obv...

거의 4년 전 | 0

| 수락됨

답변 있음
cell arrays not explicited
A = answer; % Why? You do this again here: for j = 1:numel(answer) % NUMEL is safer than LENGTH A{j} = answer{1,j}; ...

거의 4년 전 | 0

답변 있음
How to label coins after recognizing them?
rgb = insertText(I,[prop.Centroid(i,1) prop.Centroid(i,2)],'5kr', ... 'FontSize',48,'TextColor','black'); This inserts the...

거의 4년 전 | 0

| 수락됨

답변 있음
Unable to open file You might not have write permission.
Does the file exist already? Is it opened by another process already? Can you delete in manually? Can you create a new file in t...

거의 4년 전 | 0

답변 있음
Not enough input arguments.
Do not provide parameters as appended variables in the ODE45 call: % In lya: [T,Y] = ode45(rhs_ext_fcn,[t t+stept],x,R); % ...

거의 4년 전 | 0

답변 있음
simplify function does not work properly
syms kd z mean_t mean_t2 p assume(assumptions(),'clear'); eq = 8*kd^2*p^2*z*(mean_t - kd*mean_t2)^2 * ... (- mean_t^2 + m...

거의 4년 전 | 0

더 보기