Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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'); ...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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? ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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(...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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) >>...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

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

plus de 7 ans il y a | 0

| A accepté

Charger plus