Answered
Image Processing Downloading Images for GUI
The usage of "a" is confusing in your code: % Your code: a = uigetfile(); filename = a; setappdata(0,'filename',fi...

8 years ago | 0

Answered
Read size of the file in Windows Server 2012
files_log = dir(fullfile(cd, 'Matlab_log_file.txt')); (without the unneeded square brackets) is still the best and working ...

8 years ago | 0

Answered
매트랩 평가판이 만료되면 평가판으로 만든 m파일들은 어떻게되나요? (What happens to the files made from the trial when the Matlab trial expires?)
Yes, you can still use your files. The M-files are just text files. Store them in a user-defined folder, not in Matlab's install...

8 years ago | 0

Answered
How to programmatically create a script with text without saving it?
Str = sprintf('Hello!\nHere I am.\n'); EditorService = com.mathworks.mlservices.MLEditorServices; EditorService.newDocument(St...

8 years ago | 0

| accepted

Answered
I am getting an error in the code stating that,"Operands in the operator || and && must be convertible to scalar". I am very new to programming so can't really find out where the mistake is?
The error message occurs, if the input |t| is not a scalar, because the && operator requires scalars. Use & for arrays. But t...

8 years ago | 2

| accepted

Answered
Warning: Failure at t=1.130644e-05. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (2.710505e-20) at time t.
Although the code is hard to read yet, the error "Unable to meet integration tolerances" means most likely that the function to ...

8 years ago | 0

Answered
Storing data in for loop
Either: result = nan(598, size(sbz, 2)); % Pre-allocate count = 0; for n = 1:598 if c(1)<=position2(n,1)&&c(2...

8 years ago | 1

| accepted

Answered
How does the imresize function work?
|imresize| does not have or use any information about the size of the pixels. It combines the values of the pixels only to creat...

8 years ago | 0

| accepted

Answered
small difference in gradient and hessian calculated by symbolic toolbox and my analytic solution
A different order of operations can influence the numerical output of a formula. So maybe the symbolic toolbox used other parent...

8 years ago | 0

| accepted

Answered
I want to build a GUI which collects data from input and store in excel file, and every time when i will open the gui the data must be written from next available empty row in excel'
The problem is here: for j = 1:50 [~,~,raw] = xlsread('test2.xlsx',sizem,['A',num2str(j),':','G',num2str(j)]); if...

8 years ago | 0

Answered
how to show multiple images in the same picture with the name of each image without using subplots?
There are a lot of tools in the FileExchange, which provide a modified |subplot| to use more space in the figure. See <https:...

8 years ago | 1

Answered
Error with "too many output arguments" using function "gradient"
|gradient| is a built-in function, which has as many outputs as the input has dimensions. See: whos gradient -all Use a ...

8 years ago | 0

| accepted

Answered
What is missing at fzero command? (Data.xlsx at the attachment)
Use a function instead of an anonymous function, such that you can use the debugger for further investigations: function x ...

8 years ago | 0

| accepted

Answered
Why do I get "-nodesktop: command not found" error
I assume, Matlab cannot find "myscript.m". Are you sure it is in the |path|? Try matlab -nodesktop -r "beep,quit"

8 years ago | 0

Answered
Why does this not make and save a text file
fid = fopen(fileLoc, 'w'); % ^^^ Otherwise the file is opened for reading only, not for writing.

8 years ago | 0

| accepted

Answered
How do I link/lock multiple axis so that they all rotate simultaneously?
The 'Position' property is the location relative to the figure. But you want to control the 'CameraPosition', 'CameraTarget', 'C...

8 years ago | 1

| accepted

Answered
Can I generate matrix having decimal coordinates.
No. Indices must be positive integers. Of course. It seems like a trivial solution not to use indices, but to use your data a...

8 years ago | 0

Answered
Diary is not saving all outputs
I'm using a dedicated function for this job. At first this function can open some "channels" for the output, e.g. the command wi...

8 years ago | 0

| accepted

Answered
matlab can't open m file
It seems like you have redefined the function |length| and store it in a folder, which is saved on top of the |path|. The sol...

8 years ago | 0

Answered
how to set log scale range
yt = logspace(-30, -22, 5); set(gca, 'XTick', 6:2:14, 'XTickLabel', 6:2:14, ... 'YTick', yt, 'YTickLabel', yt, ...

8 years ago | 0

| accepted

Answered
Getting Error while saving the File_name.m can anyone help why i am getting this?
You need admin privileges to modify or save files inside Matlab's program directory. It is strongly recommended not to touch any...

8 years ago | 0

| accepted

Answered
Find does not work according to the condition?
a = [1 2 3]; b = [4 5 6 7]; c = [7 2]; Data = {a, b, c}; % Better use a cell array instead of a bunch of variables ...

8 years ago | 1

Answered
I want to get an image info with imfinfo
The question is not clear. We cannot guess, what |handles.Img = Img| means, because the contents of |Img| is not explained. The ...

8 years ago | 0

Answered
how can i check if the axes handles exist or not ?
See <https://www.mathworks.com/help/matlab/graphics_transition/graphics-handles-are-now-objects-not-doubles.html#budq3t3> i...

8 years ago | 0

| accepted

Answered
Can you explain how MatLab R2017a is adding 2 different order arrays and not showing math error even though I am deliberately committing one ? See the attached image.
This is called "arithmetic expansion" and was introduced in R2016b: If a specific dimension of one operand is 1, while the other...

8 years ago | 0

Answered
How can I add on to y in a for loop? Insert zeros into vector. cody question
A hint: y = [1,2,3] Then how do you create this output: [1,2,3,6,7,8] ? Do you see it? You need to *include* the...

8 years ago | 0

| accepted

Answered
Date strings with vector results
DateList = {'20/5/18', '21/5/18'}; % GUESSED input A = [19.7, 21]; B = [2.2, 2]; C = A - B; Data = cat(1, Date...

8 years ago | 0

| accepted

Answered
Uicontrol, struct cell array to uitable
No, this cannot work. You cannot create the checkboxes by |uicontrol| and move them magically into the |uitable|. I do not see a...

8 years ago | 0

Answered
restructure cell array from textscan
Some testdata: C = {}; for i1 = 1:3 for i2 = 1:5 C{i1}{i2} = i1*10+i2; end end Now the conversion...

8 years ago | 0

| accepted

Load more