답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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'); ...

7년 초과 전 | 1

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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 ...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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? ...

7년 초과 전 | 1

| 수락됨

답변 있음
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(...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 1

답변 있음
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...

7년 초과 전 | 0

답변 있음
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) >>...

7년 초과 전 | 0

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 0

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

답변 있음
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...

7년 초과 전 | 1

| 수락됨

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

7년 초과 전 | 0

| 수락됨

더 보기