답변 있음
change in xlrange of xlsread while sing loop
Why do you want to import ranges at all? Import the complete file as a matrix or table and filter out the needed values by somet...

4년 초과 전 | 0

답변 있음
Invalid expression. When calling a function or indexing a variable
You cannot use constants in the definition of the inputs of a function: function [e L] = dijkstra(datos,1,12) % ...

4년 초과 전 | 1

답변 있음
How to trace the end point of my vector without losing other plots?
Do not delete obejcts and draw new ones, but keep the obejcts and modify the coordinates. If nothing is deleted, it is easy to k...

4년 초과 전 | 0

답변 있음
Error using mex Access denied; check that you have permissions to access.
Without Admin privilges you cannot write to the Programs folder - and this is a good idea. Copy the file mexGPUExample.cu from ...

4년 초과 전 | 0

| 수락됨

답변 있음
For-loops are now faster than some of the simplest vectorized statements. Why do we still need so much deep copying?
I have heared the moaning in the net, that Matlab processes loops very slow. Then MathWorks has introduced the JIT acceleration ...

4년 초과 전 | 1

답변 있음
How to stop display of variable type in command window?
If you want the output as in old Matlab versions, you have to use old Matlab versions. To control the output, use specific func...

4년 초과 전 | 0

답변 있음
Trying to create an interpolation function where Matlab asks me for value inputs.
function Y = Interpolation (X,x1,x2,y1,y2) Y = y1 + (X-x1) * (y2-y1) / (x2-x1); end Now provide the input arguments as inputs...

4년 초과 전 | 0

답변 있음
Matlab structure of struct
MyStruct = cell2struct(cell(2, 1), {'field1'; 'field2'}) Now the fields exist, but contain empty matrices only.

4년 초과 전 | 1

| 수락됨

답변 있음
How to get the value of (V ) , using Mathlap of matrix (Write the code in step).
% V = Y \ I Y = [-12.576i, 5i, 0, 6.667i; ... 5i, -12.5i, 5i, 2.5i; ... 0, ...

4년 초과 전 | 1

답변 있음
How to stop particles crossing the solid cylinder boundary
What about: Outcircle = ((x_out - x_c(j)).^2 + (y_out - y_c(j)).^2) >= (D/2)^2; x_out(Outcircle) = x_previous(Outcircle); y_o...

4년 초과 전 | 0

답변 있음
Too many open files. Close files to prevent MATLAB instability.
Yes: call fclose(fid) after the data are imported. The operating system limits the number of files, which can be open simultane...

4년 초과 전 | 0

| 수락됨

답변 있음
Is there a safe version of `run`?
No, this is not possible. There is always a trick to use str2func to call eval , which executes a string, which is decrypted dur...

4년 초과 전 | 0

답변 있음
How can I contact the Exchange Admin?
Use the "Contact Us" button. The categories do not really match your problem, but simple choose some almost matching details and...

4년 초과 전 | 0

| 수락됨

답변 있음
Size of compressed image is larger than image .... How to solve this problem?
If the original image was written with a low quality, the default Quality=75 of imwrite might increase the file size.

4년 초과 전 | 0

답변 있음
Any onr can help me
% Sum of i (i = 1:n): s = n * (n+1) / 2 Gauss is faster and easier. % Your solution: y = 0; for k = 0:n y = y + ((n/k)...

4년 초과 전 | 0

답변 있음
Improving MATLAB programme to make it Run faster
In Matlab online one iteration needs about 3 seconds. for gamma_by_L = 0.01:0.1:5 for beta_by_L = 0.1:0.1:5 for alpha_...

4년 초과 전 | 0

| 수락됨

답변 있음
what correction is required in the code?
A hint: You want to perform this: s = 0 s = s + 2*2 s = s + 2*5 s = s + 5*8 You need to loop over the indices of m. There i...

4년 초과 전 | 0

답변 있음
How do I find f(x) if I have this definition
You have given the formula already: Create a sum from n=1:m over: (-1)^n * x^(2*n + 1) / factorial(2*n + 1) These are all term...

4년 초과 전 | 0

| 수락됨

답변 있음
Read the content of last text file in the given directory
Obtain a list of file names at first: Folder = 'C:\Your\Folder'; List = dir(fullfile(Folder, '*.txt')); FileName = {Lis...

4년 초과 전 | 0

답변 있음
I have an array and I want to check if any of the array elements doesn't satisfy a certain condition.
A = [ 5 8 1 2 7 9 6]; isLowerThan3 = A < 3 A(isLowerThan3)

4년 초과 전 | 1

| 수락됨

답변 있음
Double or single quotes for `add_line` function?
In the documentation doc add_line you find the explanation, that the inoput arguments are "character vectors". This means, that...

4년 초과 전 | 0

답변 있음
Modify built-in Matlab function without overwriting it
You want to runs the code on a different computer also. Then using a modified copy of the file an all its depenedencies is not a...

4년 초과 전 | 0

| 수락됨

답변 있음
transfer of licence from a old pc to a new pc
Yes. Open your license center: https://www.mathworks.com/mwaccount/ Click on the concerned license (the number in the table un...

4년 초과 전 | 1

| 수락됨

답변 있음
vertically aligned data using fprintf
Use the width in the format specifier data = [1 0 -0.828 -1.909 -0.974; ... 1 300 -0.838 -...

4년 초과 전 | 1

| 수락됨

답변 있음
Why y6(x)=e^[(-ax)]^2 didin't work
Welcome to Matlab! "It doesn't work" is not a useful description of the occuring problem. Post the error message instead or exp...

4년 초과 전 | 1

답변 있음
Error using bitxor Inputs must have the same size.
The mistake happens here: [M,N]=size(original); The original image is an RGB image, not a grey-scale image as the comments imp...

4년 초과 전 | 0

| 수락됨

답변 있음
Where do MATLAB-created .txt files get saved?
If you do not specify a folder, the current directory is used. See help cd help pwd Note, that pwd is just a wrapper function...

4년 초과 전 | 2

| 수락됨

답변 있음
Why my code doesn't execute correctly in other computers while works correctly in my computer?
The error message means, that the function coesamethod.m was not included during the creation of the executable. Try to include ...

4년 초과 전 | 1

답변 있음
Matlab is significantly slower than Julia on simple evaluation
I can confirm your observation that Julia runs faster than Matlab for some problems. Answering your three questions is not easy ...

4년 초과 전 | 6

답변 있음
How can I make a gif using subplots and avoid an error in function wgifc?
The calling style "subplot(121)" is outdated for over 20 years now. Use subplot(1, 2, 1) instead. You can simplify: reshape(fr...

4년 초과 전 | 1

더 보기