답변 있음
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; %%%%%%%%%%%%%% ...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 1

답변 있음
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...

거의 7년 전 | 1

| 수락됨

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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 ...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 1

| 수락됨

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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 ...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 1

| 수락됨

답변 있음
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...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 1

| 수락됨

답변 있음
How to pick an Excel file using "import data" within code?
uigetfile

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 1

| 수락됨

답변 있음
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; ...

거의 7년 전 | 0

답변 있음
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;...

거의 7년 전 | 0

답변 있음
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 ...

거의 7년 전 | 1

| 수락됨

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

거의 7년 전 | 0

답변 있음
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 ...

거의 7년 전 | 0

답변 있음
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) ...

거의 7년 전 | 0

| 수락됨

답변 있음
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...

거의 7년 전 | 1

| 수락됨

더 보기