Respondida
How can I fopen/fwrite into memory, or convert my fread double array
Do you have SSD or HDD on your computer? SSD is much faster and perhaps this is the easy solution. Otherwise, you'd have to mak...

más de 7 años hace | 0

| aceptada

Respondida
How can i handle a large amount of data (near about 16*10^10).
Save the random numbers to hard drive via |fwrite| and read the numbers from file via |fread|. OR, just control the random numb...

más de 7 años hace | 0

Respondida
Variable not printing to csv
Found an old code of mine. Does this work? % C = {'a', 'b', 'c'; 'a1', [2 3 4], 3}; % writeCell2CSV(C, 'tester.csv'); ...

más de 7 años hace | 1

Respondida
How do I rename sound files in a folder?
Use |movefile| to rename a file from BAD_NAME --> GOOD_NAME. But, BACKUP YOUR FILES before doing this for the first time! Bugs c...

más de 7 años hace | 0

Respondida
Matlab freeze when fprintf to file
Instead of 'test.m', write to 'test.txt' or something else. The fprintf is fast, but having a "test.m" file in the current direc...

más de 7 años hace | 0

| aceptada

Respondida
How to force a for loop to continue?
<https://www.mathworks.com/help/matlab/ref/try.html> Use try/catch statements to force a loop to continue due to an unexpecte...

más de 7 años hace | 0

| aceptada

Respondida
How can I vectorize Imread for loop to run faster?
Your current method for using |for| loop is okay, as vectorizing is more for matrix manipulation + math. This for loop could be ...

más de 7 años hace | 0

Respondida
HOW TO CHECK THE PARAMETERS RECEIVED IN THE FUNCTION CALL?
I think input parser + varargin is what you need here. * <https://www.mathworks.com/help/matlab/ref/inputparser.html> * <ht...

más de 7 años hace | 1

| aceptada

Respondida
How to extract the max items in struct?
When you say "max", did you mean "max number of elements" or "max value within a vector"? Did you want something like this? ...

más de 7 años hace | 1

| aceptada

Respondida
How to remove data points above or below a value in an array, nicely!
I think this is what you're trying to do: GoodRow = ~any(PRE_A(:, 2:9) <= 750 | PRE_A(:, 2:9) >= 920, 2) PRE_A = PRE_A(...

más de 7 años hace | 0

| aceptada

Respondida
mex file crashes in loop
You should call |mex| once only to compile the code once. THEN, you summon the code in your loop. You don't need to call |mex| r...

más de 7 años hace | 0

| aceptada

Respondida
Is there a simple way to condense the following codes?
Does this work? <https://www.mathworks.com/help/matlab/ref/varargin.html> function greek = OptionGreeks(opt, varargin) i...

más de 7 años hace | 0

| aceptada

Respondida
How to read data from text file (combine text and datal)
FileName = 'PhantomASTM20180731000006.txt'; FID = fopen(FileName, 'r'); Data = textscan(FID, '%f%f%f', 'HeaderLines', 32...

más de 7 años hace | 0

Respondida
saving Plots in a loop
The outputs to |contour| is different from axes handles given by |surf|. You have to find the figure handle and feed that to the...

más de 7 años hace | 0

| aceptada

Respondida
check parameter used by function with large memory
REAL NEW ANSWER You are generating a ton of invisible figure handles, and clearing the variable name without closing the figu...

más de 7 años hace | 1

| aceptada

Respondida
print function with contour too slow
Here are the times in my computer. Do you need the '-tiff', '-r600' option for eps file? tic print('EPS_test.eps','-deps...

más de 7 años hace | 0

Respondida
How to extract specific frames from a video
Try this one. Seems like |read| is no longer recommended, and it's replaced by |readFrame|. I changed the variable names too, to...

más de 7 años hace | 0

| aceptada

Respondida
Compiling .app from windows machine
Nope, this cannot be done due to the OS-specific library used. You'll have to compile in different OS. Yeah, it's a bit annoying...

más de 7 años hace | 0

| aceptada

Respondida
Why does the standalone matlab (executable) code including the parallel computing feature do not work?
NEW ANSWER: Turn your script into a function. This is the same issue seen here for Matlab 2011 version: <https://www.mathw...

más de 7 años hace | 1

| aceptada

Respondida
How can I fix the code?
For some reason, you're getting a NaN + NaNi, a complex imaginary NaN. Try to skip these, otherwise s will just become NaN + NaN...

más de 7 años hace | 0

Respondida
MATLAB crashes when saving figures in a loop
I'm suspecting an issue with the graphics card. <https://www.mathworks.com/matlabcentral/answers/103051-why-do-i-receive-a-segme...

más de 7 años hace | 0

Respondida
What does "cpsingle" function do? any idea how to see its code?
open(fullfile(fileparts(which('findchangepts.m')), 'private', 'cpsingle.m')) It's in a private folder, so you have to manua...

más de 7 años hace | 1

Respondida
need matlab source code of Strength patreto evolutionary algorithm
I wish we had a search engine that can search for "Strength patreto evolutionary algorithm matlab" and gives us a link to a matl...

más de 7 años hace | 0

Respondida
How to convert a GUI *.m file generated by GUIDE's export tool back to a *.fig file?
NEW ANSWER: How about this? 1) Export your guide .fig file as a single m file. EX: myGUI.m 2) >> h1 = myGUI 3) >>...

más de 7 años hace | 0

Respondida
Potential bug in the multi-core processing by utilizing "parallel computing" toolbox
That's called "Race Condition". Not a Matlab-specific bug, but a bug caused by improper multithreaded codes. Read more about thi...

más de 7 años hace | 1

| aceptada

Respondida
How to output to GUI window?
Is this something you were aiming for? Not sure how your GUI is made, but here's a sample .m file you could start from. %myG...

más de 7 años hace | 0

| aceptada

Respondida
How can I use created edit texts that were created by a pushbutton and (currently) have the same name?
Your "tag" is pretty much the variable name you store the uicontrol handle to. handles.textload = uicontrol(handles.p1, 'St...

más de 7 años hace | 0

| aceptada

Respondida
GUI is remembering values entered last time it was open, how to stop this?
Oh... |global| variables are used. You should NOT pass GUI data to other functions via global variables. Otherwise your GUI will...

más de 7 años hace | 1

| aceptada

Respondida
variable H1 can not be classified in parfor-loop
Take a read here for "sliced variables" <https://www.mathworks.com/help/distcomp/sliced-variable.html> parfor ii=1:(sub...

más de 7 años hace | 1

| aceptada

Respondida
EXIST ignores leading slash
NEWER ANSWER FileLoc = dir('/license/license.json') IsFileThere = ~isempty(FileLoc) && any(~[FileLoc.isdir]); NEW ANS...

más de 7 años hace | 0

| aceptada

Cargar más