Answered
MATLAB r2016b problem with cvsread
The documentation of |csvread| explains clearly: The file can only contain numeric values. 'null' is not a numeric value....

8 years ago | 0

Answered
How to access a website, fill up username and password, click in submit and get the html code of the page loaded?
You can start an external browser and use <https://www.mathworks.com/matlabcentral/fileexchange/40001-keyinject FEX: keyinject> ...

8 years ago | 0

Answered
fast sum 3D matrix, Mex file
The job should be done very efficiently by Matlab already: pix = sum(A, 3); The C code looks okay, but maybe it is simpl...

8 years ago | 2

| accepted

Answered
How to recalculate cell content in gui table using other cell content of the same table just like excel?
The error message is clear already: The variable |olddata| is a cell array, but you can apply the addition to numerical data onl...

8 years ago | 0

Answered
How to display my result in different script?
Simply add this line on top function [Ls,N,Dt,Z,HETP,dp_total] = YourFunctionName and this at the bottom: end an...

8 years ago | 0

| accepted

Answered
How do I call out a specific column in a matrix?
With some guessing: Z1 = all(B(:,1:3) | (B(:,1:2) & B(:,4)), 2); In the part |B(:,1:2) & B(:,4)| you try to apply the ...

8 years ago | 0

Answered
Use string to define path for uigetfile
There are two methods: % Folder is not a cell string and not the name "pwd": Folder = 'C:\Users\xxx\Documents\DTU\SAXS\f...

8 years ago | 0

| accepted

Answered
How to store the values which satisfy the and operation ?
allV <= 60.62 & allV <= 0 This is not useful, because it is the same as allV <= 0 I guess, you want the two columns...

8 years ago | 0

Answered
Why do I get an error?
Instead of a bunch of |if| statements with |strcmp|, you can use |switch| also: switch object case 'metal' OB =...

8 years ago | 0

| accepted

Answered
Rotate 1 by N vector
See <https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle WikiPedia: Rotation_matrix_from_axis_and_...

8 years ago | 1

Answered
How to find minimal distance between elements?
n = 10; v = rand(1, n); dist = abs(v - v.'); % Auto-expand since R2016b dist(1:(n+1):end)...

8 years ago | 0

Answered
Subplot graphs that I saved in a line
I still do not get it. Perhaps you mean: Fig1H = figure; Fig2H = figure; suplot(1,2,1, 'Parent', Fig1H); plot(1...

8 years ago | 0

Answered
How to find minimal distance during locomotion
I'm not sure, what you are asking for. So just a guess: function d = distini(x,X,y,Y) d = zeros(numel(X), numel(x)); ...

8 years ago | 0

| accepted

Answered
I cannot browse my own images into a GUI created by somebody else?
Error while evaluating UIControl Callback. This is not a clear message. It would be required to find out, what the error is....

8 years ago | 0

| accepted

Answered
How to plot the error bar to a continuous plot?
See e.g.: * <https://www.mathworks.com/matlabcentral/fileexchange/26311-raacampbell-shadederrorbar> * <https://www.mathworks...

8 years ago | 0

Answered
Change step size in MATLAB for ODE45
If the step size controller of ODE45 reaches 7e-15, the integration will take many years of processing time: Remember, that a da...

8 years ago | 1

| accepted

Answered
Why is isfield faster than intersect for strings?
As you have found out already, |intersect| has a remarkable overhead. It checks, if the inputs are sorted, and if they aren't, i...

8 years ago | 0

| accepted

Answered
Accelerating access of struct members
Matlab's JIT acceleration can improve te execution speed of e.g. loops massively. During debugging and profiling the JIT is disa...

8 years ago | 2

Answered
Allow GUI to show a different table whenever the popup menu is accessed.
You can disable the visibility of the other |uitable| objects: set(handles.uitable, 'Visible', 'off); set(handles.uitabl...

8 years ago | 1

| accepted

Answered
A for loop question
I assume, you do not want: batteryBehaviour.batteryCharge(i) = initialBatteryCharge + ... ...

8 years ago | 0

Answered
Create a number between specific values
A random value between the two limits: lim1 = (a + c) / 2; lim2 = a; d = lim1 + rand * (lim2 - lim1)

8 years ago | 0

| accepted

Answered
How to make data random around a given point and within a particular range
Maybe you mean: Result = A(:, 1) + (0.05 - 0.1 * rand(size(A, 1), 1)) * A(:, 2)

8 years ago | 0

| accepted

Answered
Using dir command but the files can not be returned
In line 2 you define numGM = length(fileNames1) and in line 196 the variable |numGM| does not exist anymore. This can ha...

8 years ago | 0

| accepted

Answered
EEGLAB CON MATLAB HOME
The Home version is a full Matlab version, but the license is limited. If you want to test, if the EEGLab software works, the Ho...

8 years ago | 0

Answered
How to refer to a specific figure handle in GUI?
And how do you load the figure? With |openfig| you get the handle of the figure directly as output: FigH = openfig(FileName...

8 years ago | 0

| accepted

Answered
Insert efficiently elements into sorted array
Actually a binary search in the subvectors is optimal. But in my experiments |find| was not slower even if the binary search was...

8 years ago | 0

Answered
what could be the cause of error "Assignment has fewer non-singleton rhs dimensions than non-singleton subscripts"?
You can check this using the debugger: * <https://www.mathworks.com/help/matlab/debugging-code.html> * <https://www.mathwork...

8 years ago | 0

| accepted

Answered
I made some changes in my code and saved them, but now i would like to return to the previous code and view it, how to do that? i'm using Matlab R2015b
You can restore the previous version of the file from your backup. Under Windows there is the "Previous Version" or "File Histor...

8 years ago | 0

Answered
How to solve the error?
Could not open "rice.dcm" for writing This can mean, that the file is write-protected or you do not have the permissions to ...

8 years ago | 0

| accepted

Answered
saving the output image
Folder = 'C:\Your\Folder'; File = 'Image.png'; Img = rand(640, 480, 3); imwrite(Img, fullfile(Folder, File));

8 years ago | 1

| accepted

Load more