Réponse apportée
Results of a while loop wont store in array
You need to index your result within the loop. x=[10:100]; a=10; b=100; c=0; resultsvector=[]; count = 0; %%%%%%%%%%%%%% ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
plotting in a loop with a function
You need to index z with each loop. count = 0; for x = 1:0.01:1.5; count = count + 1; z(count) = g(x,rpf); end plo...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Only the value corresponding to the last loop of a for loop being saved in the output array
You're getting the error because OCV(k) is a single element, and I suspect that Volt(A) is not. For the problem of only getti...

presque 7 ans il y a | 1

Réponse apportée
Please could someone explain the basics of how MATLAB updates codes in a script?
Did you delete and repost this question? I swear I saw it earlier today. A couple of things about your code. 1) It doesn't l...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How can i loop a matrix without knowing is size?
So, you have two matrices, one outside the loop, and one inside? Which one are you not sure about the size of? If it is the out...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
refrencing elements kindly explain each one
1) The first and second statements are really just the same thing, which is defining contents of matrices A and b. We know they ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to perform for-loop over sequential arrays?
It is generally always a bad idea to label variables as x1, x2, etc. because it means you have intentions of creating multiple v...

presque 7 ans il y a | 0

Réponse apportée
saving 3 dimensional single data in an Excel file
xlswrite is only able to write data in a 2D format because it can only write to one sheet at a time. In order to write your 3D d...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How do I plot multiple, disparate lines onto one graph showing changes between 2 conditions?
I would suggest a quick loop through each of your subjects. You can keep multiple lines on a single plot by using the hold comma...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Find the min for each plane of a multidimensional array
A = randi(100,3,3,3); % Sample input [m,r] = min(A,[],1); % Locate minimum value for all rows [m,c] = min(m,[],2); % Locate ...

presque 7 ans il y a | 0

Réponse apportée
delete rows from matrix if some of its elements equal all elements in another rows another different dimension matrix?
Sorry I couldn't come up with any way of doing it without a for loop. Others might know a better way of performing this, but her...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
Importing IQ samples into the matlab
I'm assuming that '.biniq' is readable as an ascii file. If that is true then here are some options for loading the data: texts...

presque 7 ans il y a | 0

Réponse apportée
combine data according to values in another vector in matlab
I know others can probably do better than I can at this, but here goes. data = [t; vals]; tims = uniques(t); for i = 1:length...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to plot streamlines in matlab ???
Try using the quiver function. It's not perfect streamlines, but it should give you an idea of what the velocity field looks lik...

presque 7 ans il y a | 0

Réponse apportée
How do I declare E=[1,-7,3,-9,5]
You can define each element of an array individually if you would like. Defining E should be pretty much exactly as it is listed...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
nested cell arrays from tables
Without having seen your data I don't know that I will be able to come up with something perfect, but hopefully this will give y...

presque 7 ans il y a | 0

Réponse apportée
how to find average signal from different excel sheets?
You can load and save the data with a for loop and then average afterwards. Alternatively, if you really want you can maintain a...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
While Loop Keep running non stop !!
Ok, I think I got something working. The while loop was a fine choice, it was more a matter of indexing and changing things toge...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How to pick an Excel file using "import data" within code?
uigetfile

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Matlab OR | operator not working
To the best of my knowledge the or operator doesn't work quite like that. You need to set separate conditions on each side of th...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Time-series data
The 'simplest' way to do a series of mean values is to use a for loop with the mean function. nmean = 50; % Number of values yo...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
combining (concat) matrix in loop to get desired output plot
I suspect the issue you're having is because you're using the same C4 without attaching it to Z each time in the loop. This mean...

presque 7 ans il y a | 0

Réponse apportée
How to modify this could so it can read from different files groups?
Add a second loop. Instead of just going through all files in a single loop, have an outer loop that looks for the number of gro...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
Looping the data along with deliminaters (please find the code below)
You were on the right track with your loop that you had already, the biggest thing would be to add an index. i = 0; ...

presque 7 ans il y a | 0

Réponse apportée
Data Analysis advance filtering
You can do this with logic indexing. data = ... % Your main data block conditions = data(:,1)>0.1 & data(:,2)>3 & data(:,3)<1;...

presque 7 ans il y a | 0

Réponse apportée
How to modify this code to make it import values from a file?
Importing and reading the data into matlab is fairly simple, and you can take your pick of text readers. It sounds like dlmread ...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How can I display a value of a vector for a specific value?
This can be done with logic indexing. w2 = w(p==0);

presque 7 ans il y a | 0

Réponse apportée
i have to read files in specific folder
You need to specify the path that you gathered with 'test_image', otherwise the dir command is just going to search the current ...

presque 7 ans il y a | 0

Réponse apportée
Plotting data within a loop
I'm not sure if I understand exactly what you're trying to do, but here goes. nums = unique(tr(:,h)); for i = 1:length(nums) ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to loop multiple images in a subplot?
There are some small adjustments to be made for this to work. Also, I'm not sure what you want to plot your 'c' variables agains...

presque 7 ans il y a | 1

| A accepté

Charger plus