Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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'); ...

mehr als 7 Jahre vor | 1

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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? ...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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(...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 1

Beantwortet
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...

mehr als 7 Jahre vor | 0

Beantwortet
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) >>...

mehr als 7 Jahre vor | 0

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 7 Jahre vor | 1

| akzeptiert

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

mehr als 7 Jahre vor | 0

| akzeptiert

Mehr laden