Réponse apportée
Pull the same variable from multiple .mat files and put into an open office calculator or .txt
If it's just about generating the file names, there are two options. Either you use the dir() function and get all the files whi...

plus de 11 ans il y a | 0

Réponse apportée
Plotting data from struct
If you have something like you suggest to have: someStruct.a=1:10; someStruct.c=rand(1,10); plot(someStruct.a,someStruc...

plus de 11 ans il y a | 10

| A accepté

Réponse apportée
string to calculation algorithm ?
eval(string)

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to count points outside the bound in scatter plot?
I'm not exactly sure what's going on here (the link to your file does not work). However, if you want all data outside the lower...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I add a horizontal scroll bar to a figure
Easiest in my opinion is to use a panel as container for all controls you want to move. A minimal example is the following: ...

plus de 11 ans il y a | 1

Réponse apportée
move the axes to sit in the whole window
Dear Alex, set(gca,'position',[0 0 1 1]) should do the job. Best regards, Michael

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to Plot a graph with restriction?
Dear Mustahsan, not sure if that's what you mean, but please check for xlim([pi 2*pi]) Best regards, Michael

plus de 11 ans il y a | 0

Réponse apportée
how to plot a 10*10 grid map and how to number the grid cells? (sample pic is attached here)
I don't know what you mean with "plot this grid". Maybe something like this? grid=reshape(0:99,10,10)'; figure, surf(grid...

plus de 11 ans il y a | 1

Réponse apportée
save matrices of the sequential names in cell array
Why everybody wants to put the index into the variable name? That's exactly how you not profit from Matlab's strengths. I gu...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Seperating a colum vector into different cells.
Star Strider's solution will have the last value of fvc{n} to be the first value of fvc{n+1}. Is that intended? I understand the...

plus de 11 ans il y a | 0

Réponse apportée
Surface plot: an extra variable, assigning a value to each element
Looks like aw=.9-x/10. Just replace this in your equation.

plus de 11 ans il y a | 0

Réponse apportée
Plotting mean of the columns of image on that image
Actually, I believe he just gave exactly contradicting answers on Guillaume's question. As I get it, this is what the result sho...

plus de 11 ans il y a | 1

Réponse apportée
How to dynamically update figure ticks and labels while inspecting data
Actually, it _does_ update the ticks by default. You might have set the XTickMode to Manual, either directly or by setting the X...

plus de 11 ans il y a | 0

Réponse apportée
what can I do to prevent overwriting in for loop?
for cnt=1:fix(length(x)/60) z(cnt)=mean(x((cnt-1)*60+1:cnt*60)); end But it's faster to not do it with a loop: z...

plus de 11 ans il y a | 0

Réponse apportée
Extract a sphere out of a cube
Do you mean something like this? [X,Y,Z]=meshgrid(linspace(0,1,20),linspace(0,1,20),linspace(0,1,20)); x=X(:);y=Y(:);z=Z...

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
To calculate the angles of the Delaunay triangles
I like that question. I'm curious if there's a faster solution (maybe even a built-in function I don't know), but my code looks ...

plus de 11 ans il y a | 1

Réponse apportée
Problem related to legend
Several possibilities: - Make the buildings as one object. Put NaN values between the xy values of the buildings to separate...

plus de 11 ans il y a | 0

Réponse apportée
Remove rows in a csv file
Without line breaks, it's a bit tricky to see how the file is formatted. However, all the text file reading functions have kind ...

plus de 11 ans il y a | 0

Réponse apportée
Search an element in another matrix.
intersect has more output arguments: [C,ia,ib] = intersect(A,B) So you can use ia and ib to get the values you want: ...

plus de 11 ans il y a | 0

Réponse apportée
How to get values ​​from a column based on the values ​​of other columns?
Are A...J cell arrays with strings or numeric arrays? If you have numbers, this should do the job: Z=J(B==1); If it...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
load variables into workspace (simpel)
The assignin function might be helpful for you.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Array of structures (new)
You can simply sort it and use the second output argument: [~,ind]=sort([Data.y]); sData=Data(ind); As always, there's...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
MATLAB Simulink fprintf logical values
I think the easiest way is to write a tiny subfunction which converts a logical true and a false to the strings "true" and "fals...

plus de 11 ans il y a | 1

Réponse apportée
Probability of gray level in an Image
Are all images equally sized? If so, if I didn't get you wrong, you can just use the mean of the 5 pdfs. Otherwise, you have to ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
taking average and saving to new file
So, what should the new x2 be? The average of old (x2, x3, x4) or the average of old (x4, x5, x6)? In the first case, it's b...

plus de 11 ans il y a | 0

Réponse apportée
combining variables into one variable
I'd like to throw the cat function into the discussion: X=cat(3,S000_010,S010_S020,...); To your question in the commen...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Scramble the positions of a cell array
Dear Abirami, one possibility: ind=cellfun(@(x) sub2ind(size(Z),x(1),x(2)),Z); [~,s]=sort(ind(:)); G=reshape(W(s),s...

plus de 11 ans il y a | 0

Réponse apportée
writing and call a function in a script with for loops
It's generally not ideal to name variables "i" and "j" as they are also used for the imaginary unit. That's exactly what is happ...

plus de 11 ans il y a | 0

Réponse apportée
How to read and take a part of data of a text file in MATLAB
Dear Phan, textscan can do the job: >> fid=fopen(filename); >> data=textscan(fid,'%f ABC63-8%d'); >> fclose(fid)...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Reading Specific Lines and Coulmns
Dear Köksal, you can simply use textscan: fid=fopen(filename); data=textscan(fid,'%*f%f','delimiter','\t','Multiple...

plus de 11 ans il y a | 0

Charger plus