Respondida
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; %%%%%%%%%%%%%% ...

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

| aceptada

Respondida
How to pick an Excel file using "import data" within code?
uigetfile

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

Respondida
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; ...

casi 7 años hace | 0

Respondida
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;...

casi 7 años hace | 0

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

casi 7 años hace | 1

| aceptada

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

casi 7 años hace | 0

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

casi 7 años hace | 0

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

casi 7 años hace | 0

| aceptada

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

casi 7 años hace | 1

| aceptada

Cargar más