Réponse apportée
Cell to matrix average
Something like this should work for you: %generate some example data data=cell(93,1); for n=1:93 data{n}=rand(45,147,19)...

presque 7 ans il y a | 0

Réponse apportée
How do you use ls to change your directory in Matlab?
The homework is either badly designed, or is attempting to teach you why you shouldn't use it. You shouldn't change your curren...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Standard Deviation of 3D matrix with NaN elements
This syntax should work for most releases: sdev=std(m(:),'omitnan');

presque 7 ans il y a | 0

Réponse apportée
Picking files according to file names
Use the dir function to generate a list of files, then parse the file names in a loop and continue to read the relevant files.

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Finding consecutive data with non zero in array
I used the mfile version of Jan's FEX submission RunLength, because I can't get my compiler to work right now. With the runlegth...

presque 7 ans il y a | 0

Réponse apportée
randomly divide vector into 2 parts.
I don't fully understand every step of your code, so I rewrote it: index_rating=rand(100000,5);%generate example data training...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
imread not working for gif problem
It took some digging with the debugger, but with enough breakpoints I was able to track down the cause. Your calls are failing b...

presque 7 ans il y a | 2

| A accepté

Réponse apportée
write a range on the y-axis
You can modify the XTickLabels property to display any char array. figure(1),clf(1)%only use clf during debugging ax=axes; pl...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How can I run a Matlab script at the same time everyday?
It is probably easiest to use the options your OS provides and run a headless instance of Matlab. On Windows you can use the tas...

presque 7 ans il y a | 0

Réponse apportée
Changing data from long form to short form
You can use the participant ID and trial ID as the indices and either use accumarray or sub2ind to fill the matrix with the valu...

presque 7 ans il y a | 1

Réponse apportée
How to count the number of voxels of another color
Similar to how you would do that for 2D: IM=randi(255,[512 512 400]); count=sum(IM==200,'all'); %if your release doesn't ha...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Save data from MatLab GUI to struct .mat file
You should always load to a struct. That makes it clear where variables come from. Then it is also easier to extend the struct i...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How can I base my legend on the markers I defined in my plot?
The best solution is to set the DisplayName property when calling plot, and/or use an array of handles to create the legend. See...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Legend repeating same color
Set the DisplayName property when calling plot, or use the output from plot to build your legend with specific handles. x=linsp...

presque 7 ans il y a | 4

| A accepté

Réponse apportée
write and read the same image but they are different
You should read the documentation of the functions you're using if you want to understand them. Matlab has excellent documentati...

presque 7 ans il y a | 0

Réponse apportée
Make matlab use a function from a certain toolbox
You have assigned something to a variable named dist. That will shadow all functions. The solution is not to use dist as a varia...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Comparing 2 lists and assign a value
If you can make two arrays, you can use the ismember function, which should work well for large arrays as well.

presque 7 ans il y a | 0

Réponse apportée
How do I end a program when a condition is met using only if-else-elseif statements?
Something like this will work (edit to add nesting): function out=MyFunction(in) if in<1 if in==0.5 %do somethin...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Why won't MatLab properly download onto my windows laptop?
If you go to your account (this link should get you there) you can click on your license number. Then go the 'Install and Activa...

presque 7 ans il y a | 0

Réponse apportée
Custom GUI: Check for updates
You could probably have a function check your website at most once a week by calling your update function when starting some spe...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
HOW Calculate the distance of points form one center in 2-D space and display output in a distance matrix?
This should do the trick: X=2*(rand(5,5)-0.5); Y=2*(rand(5,5)-0.5); x=0.3;y=0.3; d=point2pointcloud(X,Y,x,y) function d=p...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
how can i covert following variables as Indexed variables ?
No need for a conversion, they already are indexed variables. Lets give a small example of what this message means: data=1:5; ...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How can i fit the data to the custom equation without using Curve fitting Toolbox ?
Sligthly exanpding on what Walter suggests: fun=@(ABCDE,t) ABCDE(1) + ABCDE(2) .* (1-exp(-t./ABCDE(3))) + ABCDE(4) .* (1-exp(-t...

presque 7 ans il y a | 0

Réponse apportée
Where should we install third-party toolboxes under Windows?
My personal preference would be to pick 2 or 4. In general users messing with their copy of Matlab causes headaches. The advanta...

presque 7 ans il y a | 1

Réponse apportée
why am I getting 'ugly' output?
At this point you should consider creating a small GUI for your input selection. But for your question at hand: you forgot to al...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How to show r square correlation and RMSE on a scatterplot
With the code below you can determine a fitted value for y. Now it should be easy to calculate the Rsquare and RMSE. Let me know...

presque 7 ans il y a | 1

Réponse apportée
Array inside an Array
If you have only positive integers, you can use an undocumented feature of strfind: D=[0 1 1 2 3 4];d=[1 2 3]; strfind(D,d) % ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to make Matlab use all CPU cores?
The value of n is only 63, so the main constriction in your code is the while loop, which can't be parallelized. Matlab is fund...

presque 7 ans il y a | 1

Réponse apportée
How to call .m file from an other .m file?
Scripts should only be used for examples and debugging. Your code is a function, so you shouldn't treat it as a script. It would...

presque 7 ans il y a | 0

Réponse apportée
Is there an eraser for Matlab graphs?
You can use the annotation function to force a white background around a text label. If you add the annotation after plotting yo...

presque 7 ans il y a | 0

Charger plus