Answered
mapping a value to a vector
X = [10.2, 7, 25]; Edge = [6, 7.8, 9, 10.8, 17, 18.8, 24, 24.6, Inf]; Bin = [6, 9, 12, 18, 24, 36, 48, 54]; ...

9 years ago | 0

| accepted

Answered
Extracting Vector from Cell Array Row or Column
When trying to extract a row (or column) vector from a Cell Array Was does "extracting" mean? Your code: [timeB{1:end}]...

9 years ago | 0

Answered
How to print number with superscript value in Editbox GUI in matlab
What about_ uicontrol('Style', 'edit', 'String', ['22.4 mm', char(178)]) But this is limite to specific fonts and only s...

9 years ago | 1

Answered
HELP eval - Undefined function 'eval' for input arguments of type 'cell'. - find structure (from workspace) with part of name and accessing it
The topic of the dynamic creation of variables is discussed very frequently. The answer is always the same: Don't do this. If ca...

9 years ago | 0

| accepted

Answered
How can I split a matrix into N different parts?
Storing in separate matrices might be a bad idea. Why not using the matrix itself? data = rand(120, 30); data9 = reshap...

9 years ago | 3

Answered
How not to reload persistent variables twice?
This is explained in the documentation: <https://www.mathworks.com/help/matlab/ref/persistent.html doc persistent>: functio...

9 years ago | 2

Answered
replacing the for loops Please
If you want to increase the speed, care for pre-allocating PT_load. Then avoid repeated work inside the loops: count = 0...

9 years ago | 0

| accepted

Answered
Can I modify inputs for pushbutton callback
... FigData.FigH = figure; FigData.h1 = uicontrol('Style','PushButton','String','Get a', ... 'Units','norma...

9 years ago | 0

Answered
Selecting one array out of three.
Or: A = [1 2 3 4 5 6 7 8 9 0 3 4 5 6]; B = [4 5 6 7 8 6 7 8 9 1 3 4 5 0]; C = [5 6 7 8 9 0 0 9 5 5 5 5 6 7]; Poo...

9 years ago | 1

| accepted

Answered
Why the R G B component of a pic are not red green and blue?
The R, G and B channel of an RGB image do not have a color, but an intensity only. It is the intensity of the red, green and blu...

9 years ago | 0

| accepted

Answered
Not enough input arguments.
You can use the debugger to examine the problem by your own. Type this in the command window: dbstop if error Now start ...

9 years ago | 0

Answered
Solving ODE with singularity
the resulting function should be continuous around t=0 and is equal to 0 at t=0 No, this is not the case for y0=[0 1] and y0...

9 years ago | 0

Answered
How can I use a variable for addpath()
Try: folder_name = char(get(handles.edit1,'String')); com_path = fullfile(first_string, user_name, second_string, fol...

9 years ago | 0

Answered
Dynamically choosing files in a deployed application
You can use absolute path names to address the files. This is trivial, actually, therefore I'm not sure if I understand your que...

9 years ago | 0

Answered
Why Matlab is preferred over other model based development tools?
You ask in a Matlab forum about the benefits of Matlab. Of course the answers will be biased, because most Matlab users use Matl...

9 years ago | 1

Answered
how to concatenate vetcors
v = [1 2 3 4 5 6 1 2 3] k = [4 5 6 7 8 9] c = [4 5 6] in_v = strfind(v, c); % Replace c in v if ~isempty(in_v) ...

9 years ago | 1

| accepted

Answered
Image opening on the wrong axes in a Matlab GUI
The description is vague. Better post the relvant code to demonstrate the problem exactly. You explanations start with a prob...

9 years ago | 0

Answered
Matlab App Designer in a 32bit Matlab version ?
See e.g. <https://www.mathworks.com/help/matlab/creating_guis/graphics-support-in-app-designer.html>: The App Designer works sin...

9 years ago | 0

Answered
How to import and read a binary file in Matlab
"16 bit Intel format" is not unique. It could be an UINT16, INT16, FP16. "Intel format" means "little endian". Some ideas: ...

9 years ago | 3

| accepted

Answered
Mod function returns decimal value?
The output of mod operation should be an integer, right?? No. The output of modulo operation returns the remainder value...

9 years ago | 0

| accepted

Answered
Why doesn't csvread read properly?
I cannot imagine why your CSVREAD does not work. Perhaps you are reading the wrong file? The 2 semicolons at the end of the line...

9 years ago | 0

| accepted

Answered
anonymous function for if-else statements
@(x) condition * b(x) + (~condition) * c(x) But you see, that b(x) and c(x) are evaluated also. The best strategy is not to...

9 years ago | 0

Answered
remove element from cell based on vector
One time again: a = {[1 2] [3] [1 5 2] [2] [ 44 5 66 1 2]}; remove = [1, 2]; for ia = 1:numel(a) a{ia} = setdiff...

9 years ago | 0

| accepted

Answered
Construct a table with the index of the positions of sign changes on a matrix
* Use one command per line. This allows the JIT accelerator to perform at best. * Use the profiler to find the bottleneck of th...

9 years ago | 0

| accepted

Answered
Matlab Engine for C - Passing Arrays
You do not want to display the pointer, but its contents: double * sum; sum = (double *)mxGetData(result); printf("Th...

9 years ago | 1

Answered
Datenum problem and reading from excel sheet
The error message is clear: |raw_bouts_data(2:end,5)| is not a cell string. Check this: find(~cellfun('isclass', raw_bouts_...

9 years ago | 0

Answered
Mapping arrays based on repeating integers in a vector
What do you find ugly here? S = cell(1, length(Z)); for k=1:length(Z) S{k} = (E(:,1) == k); end With a pre-al...

9 years ago | 0

| accepted

Answered
Averaging matrix values after Interpolation
Which is the cell you want to average over? If it is |yi|: v = zeros(1,24); for k = 1:24 v(k) = yi{k}(1); end ...

9 years ago | 0

Answered
How to read in a lot of files, average a column, and output in a new file?
folder = 'C:\Your\Folder\'; csvFiles = dir(fullfile(folder, '*.csv')); % Use absolute path names numfiles = length(cs...

9 years ago | 2

Answered
How Can I randomly select 20% of my array elements AND save their indices (row,column) ?
A = [230,30,40,40,80;40 40 30 80 230;40 40 40 230 80]; n = numel(A); Index = randperm(numel(A), ceil(numel(A) * 0.20)...

9 years ago | 0

| accepted

Load more