Answered
Audio file information to be shown as text on GUI text
info = audioinfo(FileName); Field = fieldnames(info); Data = struct2cell(info); CStr = cell(1, numel(Field)); f...

8 years ago | 0

| accepted

Answered
What do to with ode45 symfun error?
The message means, that you provide a symbolic function, but |ode45| handles numerical functions only. Please post your inputs a...

8 years ago | 1

Answered
Saving breakpoints in a script
No, do not insert this into the script. Keep the information about debugging and the actual code separated. When you want to ...

8 years ago | 4

| accepted

Answered
Are xml functions standard in Matlab?
|xmlread| belongs to the standard toolbox, as well as |xmlwrite| and |xslt|.

8 years ago | 0

| accepted

Answered
Move a figure with the mouse
See e.g. <https://www.mathworks.com/matlabcentral/fileexchange/23304-moveit2-move-a-graphical-object-with-the-mouse FEX: movit2>...

8 years ago | 0

Answered
How do I program my app to export a file to Windows File Explorer?
[file, folder] = uiputfile('*.wav'); if ~isequal(file, 0) % User did not press Cancel: audiowrite(fullfile(folder, fi...

8 years ago | 0

Answered
Changing a circle in resize-able GUI
You can't. Using a marker to draw a circle, the size is fixed. Better: alpha = linspace(0,2*pi,100); x = r * cos(alp...

8 years ago | 0

Answered
What can I do to filter my EMG data(.csv) in Matlab?
Matlab's |filter| command works with matrices directly. What exactly is the problem then? Example: % A bandpass filter, 20-...

8 years ago | 0

Answered
How can I identify value of an array?
Maybe you want something like this: C = [2,1,0]; index = find(C == 1); Or [match, index] = ismember([1,2], C...

8 years ago | 0

| accepted

Answered
How to make a submatrix assignment faster?
I do not understand, what your question is. You found out already, that assigning the scalars is much faster than creating the t...

8 years ago | 1

Answered
If I want to have x as a 3 element vector say [2,3,2], how to I write a loop to iterate over each value in the array for x?
x0 = [2,3,2]; t = zeros(1000, 1); x = zeros(1000, 3); v = zeros(1000, 3); x(1, :) = x0; n = 1; while ...

8 years ago | 0

| accepted

Answered
Area between function and polyline
How are the values of the lines stored? In two vectors containing Y values to the the same X coordinates? If so: match = (y...

8 years ago | 0

| accepted

Answered
Can someone help with this code to solve the Linear Algera problem?
Start with converting the equations to one matrix equation: x1-x2+x3-x4=3 3x1+2x2-4x3+x4=2 -x1+5x2+2x3+3x4=4 4x1+x...

8 years ago | 0

Answered
error when running matlab
Undefined function or variable 'matlabrc' This is evil. Try to run |restoredefaultpath|. See <https://www.mathworks.com/help...

8 years ago | 0

| accepted

Answered
I dislike odd numbers
Dear Matt J, simply redefine "odd". function T = isOdd(X) T = false(size(X)); end Or modify the IEEE754 doubles: ...

8 years ago | 2

Answered
Is there a way to change order of dicoms?
X = dicomread(filename); X = X(:, :, :, size(X, 4):-1:1); Or maybe: n = 50; for k = 1:n X = dicomread(filen...

8 years ago | 0

| accepted

Answered
How do i create a single table from this for loop? I get lots of 1x3 tables from this code instead of a single table. I can't figure out how to index the values to arrays.
n = size(tracks, 1); % Safer than LENGTH x_displacements = zeros(n, 1); first_x = zeros(n, 1); last_x = zeros(n, 1)...

8 years ago | 1

| accepted

Answered
How to stop ode45 when value reach certain value other-than zero
According to the documentation <https://www.mathworks.com/help/matlab/math/ode-event-location.html>: An event occurs when va...

8 years ago | 1

Answered
counting the number of frequency in wav file
[y, fs] = audioread('C:\Users\Faiz\Desktop\Kick.wav'); yRMS = sqrt(sum(y .^ 2, 2)); % Root mean square, same as abs...

8 years ago | 0

| accepted

Answered
How to compare two vectors and output the index?
One loop and one |find| is enough, easy and very efficient: A = [60,600,15]; B = [60,512,30,13]; % For each element...

8 years ago | 0

Answered
How do I plot 3d graphs using just matrices Values
The curly braces are used to create |cell| arrays. You want numerical arrays and need square brackets: A = [1;2;5;7;10;20];...

8 years ago | 0

| accepted

Answered
Using values from previous time step in ODE solver to use for next time step?
Something like a "previous time step" or "iteration" is not meaningful in standard ODE integrators. The previously calculated st...

8 years ago | 0

Answered
could anyone help me to fix the issue
Replace % I guess loops over t,r,s ?! B(t,r,s)= max(cell2mat(o_th(t,r,s,:))) % end loop by B = max(cell2mat...

8 years ago | 0

Answered
Any function to get a short description of a variable just like the Value column in workspace?.
What about writing a function, which satisfies your needs exactly? function C = DispStructRoughly(S) Field = fieldnames(...

8 years ago | 1

Answered
Changing the color of a ligne in listbox
See <https://undocumentedmatlab.com/blog/listbox-layout-customization undocumented: Listbox customization>. Use HTML: ui...

8 years ago | 1

Answered
hi ,i I have a directory that contains several subdirectories and i want to search for files in it by their names but i have just the first word of the name for example :
Maybe: FileList = dir('D:\calibration_lat\**\YourFileName.ext') With more details in the question, a better answer shou...

8 years ago | 0

Answered
Access is denied when installing external program
This is the public forum and the answers are given by volunteers. We cannot "look into your account" and it is a bad idea to pub...

8 years ago | 0

Answered
what is mistake in my code? i want to simulation brownian motion.
I had posted an answer here yesterday, but it vanished?! Strange. I try it again: Your code is *one* random walk over N*M ste...

8 years ago | 0

| accepted

Answered
"if" statement in "for" loop takes too long to run
Try to vectorize the code: for j = 1:length(hrsinaday) index = (one(:, 1) == hrsinaday(j)); A(index...

8 years ago | 0

Answered
Fill NaN cell with mean of eight surrounding cells in grid data in matlab
If you want to replace a scalar based on a 3D array, you either need 3 |nanmean| calls: nanmean(nanmean(nanmean(data(i-1:i+...

8 years ago | 0

| accepted

Load more