답변 있음
How can I split up several numbers in one cell from an excel file?
[~,~,data] = xlsread('myexcel.xlsx',range); data = cellfun(@(x) str2num(x),data); This is a first crack at the code. I'm not a...

거의 7년 전 | 0

답변 있음
How to plot data from a text file with variable delimeters.
Others may have a better solution, but because of the varying delimiters I think you may have a better time with just loading th...

거의 7년 전 | 0

답변 있음
Find all instances of a condition in x , replace corresponding y values with ymax (of subset or a give value) via for loop..data attached
Instead of looping through all values of h_new, you might try looping through all unique values of x. uniques = unique(x); hco...

거의 7년 전 | 0

답변 있음
Read multiple files and store fitting parameters & graphs
function [results] = test(A,B,C,D,E,F,G,H,time) numfiles = 2; mydata = cell(1, numfiles); for k = 1:numfiles myfilenam...

거의 7년 전 | 0

답변 있음
Simpler way of getting single column from each row?
Without having access to your data I can't test this, but my first thought is to do basically what you mentioned last. waveValu...

거의 7년 전 | 0

답변 있음
Splitting up large amount of data into smaller tables based on one coloumn
Hmm, I think I kind of understand what you are trying to do. Let me know if this works. mark = 1; cll = 1; for i = 2:size(x,1...

거의 7년 전 | 0

답변 있음
Unstack long XY data sets into individual tests over columns by length
Try: datatest = reshape(data,[25,3910]);

거의 7년 전 | 0

답변 있음
inserting into certain locations in array
F = A; for i = 1:I F = [F(1:C*i+length(B)*(i-1)),B,F(C*i+length(B)*(i-1)+1:end)]; end

거의 7년 전 | 0

| 수락됨

답변 있음
how to write this equation in Matlab?? please help
sigma = (I/eta).*sum(sqrt(ln((Imax(range)+Imin(range))./(Imax(range)-Imin(range)))); Something like this. Your 'range' is going...

거의 7년 전 | 0

| 수락됨

답변 있음
Index in position 1 is invalid. Array indices must be positive integers or logical values.
You're getting the error because you are using 'beta(a,b)' inside your loop, but neither a or b are positive integers or logic s...

거의 7년 전 | 1

| 수락됨

답변 있음
How to compare values in two arrays and find when the index of one array exceeds the index of another
i = 1; j = 1; k = 1; while k <= size(A); if A(i) >= B(j); C(k) = 0; k = k+1; j = j+1; el...

거의 7년 전 | 0

| 수락됨

답변 있음
Excel filename from cell
xlswrite(mycell{1},data);

거의 7년 전 | 0

답변 있음
Using Excel files in function
This is a quick first cut, so you will likely need to do some fine tuning of your own. I am assuming that your city distance dat...

거의 7년 전 | 2

| 수락됨

답변 있음
Removing zeros in excel
Guillaume and Walter will probably have much better methods for doing this, but here is my first thought. [num,txt,data] = xlsr...

거의 7년 전 | 0

답변 있음
Multiple conditional statements and a for loop.
You can combine multiple conditions using & (and) and | (or) (&& and || are also things). Using this method I think it's worth c...

거의 7년 전 | 0

| 수락됨

답변 있음
How do I import multiple text files and automatically add them into a single cell array? Maybe 3D?
In looking over your code I don't actually see any dynamic naming occuring. Dynamic naming is manually naming variables with dif...

거의 7년 전 | 1

| 수락됨

답변 있음
Making a plot to find out when, during a 24 hour period, two rows in excel has the same value.
Do you specifically need to plot the results? Why not just use logic indexing? t = data(:,ismember(data(:,2:3,1),data(:,2:3,2))...

거의 7년 전 | 0

답변 있음
I need help to correct this code. How do I get this error corected (Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second matrix.)?
I believe the error is in using matrix multiplication, versus element multiplication. You have: detPhotonsF = F + randn(noOfRun...

거의 7년 전 | 0

| 수락됨

답변 있음
How do i make a function with the question below?
func2str is a command which converts a function class variable (i.e. your f variable) into a string class variable. A class is b...

거의 7년 전 | 0

| 수락됨

답변 있음
Check each element in matrix is less than value
i would like to check if each element By 'check each element' do you actually need to go through each element in a loop, or wo...

거의 7년 전 | 0

답변 있음
How to open files in different folders for data processing?
Take a look at this. https://www.mathworks.com/matlabcentral/fileexchange/172-findfiles It is possible to look through directo...

거의 7년 전 | 1

답변 있음
how i can delete useless data from matrix
Here is something to try. Probably not the most efficient, but it should do what you're asking. vals = unique(data(:,8)); data...

거의 7년 전 | 0

답변 있음
Extract the index and find the value in other array that have the same extracted index?
You shouldn't actually need a for loop to do this, just some logic indexing. goal = x2(ismember(t2,t1));

거의 7년 전 | 0

| 수락됨

답변 있음
Pass values to outside of loop after each iteration
You cannot 'pass' the values out of the loop, but instead you should store them in an indexed variable. Then, after the loop has...

거의 7년 전 | 0

답변 있음
How can i operate on every newly created vector in a for loop?
Ok, I think maybe all you need to do is add a second internal loop to loop through all the cells of the previous iteration. for...

거의 7년 전 | 0

답변 있음
limiting columns of a matrix
The reason you're getting that error is because you cannot call the index of an empty array. If limit1 is (1x0) double and you a...

거의 7년 전 | 0

| 수락됨

답변 있음
How to check multiple values of one variable in if statement
You should just be able to index your if condition. if col(1:3) == [1 2 3] // do something end

거의 7년 전 | 1

| 수락됨

답변 있음
Matching Time from 2 files/arrays
Ok, I think I found a more workable solution. First I would convert your cells to datetime, because I prefer working in regular ...

거의 7년 전 | 1

| 수락됨

답변 있음
when ploting the left y axis always be the bule I can not change the color
When using any of the plot commands it is possible to add a string to format the plotted line. plot(x,y,format); % Where format...

거의 7년 전 | 0

| 수락됨

답변 있음
Update figure after each loop
I suspect that you are having a challenge because you activate 'hold on' right after myfunc3(), but you don't deactivate it. Thi...

거의 7년 전 | 0

더 보기