回答済み
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

さらに読み込む