문제를 풀었습니다


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

6년 초과 전

답변 있음
How can I plot a figure with 5 subplots and save it and then move to the next figure containing 5 subplots and save it under an other name?
You can assign a figure number with the figure command. You can save a figure with the savefig command. Just put them both, or...

6년 초과 전 | 0

| 수락됨

문제를 풀었습니다


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

6년 초과 전

문제를 풀었습니다


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

6년 초과 전

답변 있음
Creating a structure array containing names of external files
As Rik mentioned, it sounds like dir is what you want. files = dir(path); This will return a structure called 'files' which co...

6년 초과 전 | 0

| 수락됨

답변 있음
How to store lines in a text file based on preceding text
There are a couple of methods for doing this. Let me know if you have questions. fid = fopen('mytextfile.txt'); line = fgetl(f...

6년 초과 전 | 0

답변 있음
Find string in txt and delete searched string line
You can use Jan's method from the linked question to find your lines. Then once you have found them turn them into blank lines (...

6년 초과 전 | 0

| 수락됨

답변 있음
Nested for loop, too slow
It looks like you want to blank the entire row, correct? A = 1:56:2464; D(A,:) = 0; EDIT** Change variable names as you need ...

6년 초과 전 | 0

| 수락됨

답변 있음
Importing Excel multiple sheet with individual multiple columns
What exactly is your question? What specifically do you need help with? xlsread is only able to read one sheet at a time, so wh...

6년 초과 전 | 0

| 수락됨

답변 있음
applying algebraic eqns across multiple dimesions of matrix using indexing
Ok, you aren't too far off with your thoughts, but I'll include an example. You should be able to cover the first and second di...

6년 초과 전 | 1

| 수락됨

답변 있음
Importing a Large CSV in chunks and getting Data Range Invalid
You can call headerlines to specify a starting point with textscan, but I don't know if it is possible to specify an ending poin...

6년 초과 전 | 0

답변 있음
How to extract the following number from a text file?
There are a couple of options how to do this. You can read the entire file in as strings, find the line you want, and regexp the...

6년 초과 전 | 1

| 수락됨

답변 있음
How to resolve a too many input argument error from using Function
Thank you for posting the other functions. When I attempted to run your code I encountered an error due to the naming convention...

6년 초과 전 | 0

| 수락됨

답변 있음
change color in loop with scatter3?
Changing the color with the position is done with an if statement, just like you suggested. for i = 1:size(Nbrc,1) ... % D...

6년 초과 전 | 0

| 수락됨

답변 있음
How to save lots of 3D matrix obtained from a for loop in matlab
'Could you please tell me how to achieve this?' It seems like you have done this already. Is there something not working in the...

6년 초과 전 | 0

| 수락됨

답변 있음
How can i make the Temp matrix to contain all the values of T calculated in both conditions
H = [ 1:10:100] L = 0.0065 %K/m T0= 288.15 Temp= zeros(j) for j= 1:length(H) for B = H<=11 % till 11 km ...

6년 초과 전 | 1

| 수락됨

답변 있음
Running a matlab file multiple times on the same computer
Short answer is yes, it is possible, but unfortunately I am not exactly sure how to do it. If I remember the method I saw it was...

6년 초과 전 | 0

답변 있음
How to add a new column in a txt file with if condition
What kind of data do you have in the file? The type of data really determines the complexity of this answer. The basic steps of ...

6년 초과 전 | 0

| 수락됨

답변 있음
Opening mat files with uiopen and copying data to array
It seems like your issue isn't so much opening specific files, but identifying new variables. With a bit of trickery you can ide...

6년 초과 전 | 0

답변 있음
Help finding the first minimum value in an array and indexing the value in a new array!!!
Part of the issue you're having is that your if statement doesn't have an actual condition in it. if (find((v(i)<v(i+1)) && (v(...

6년 초과 전 | 0

| 수락됨

답변 있음
Indexing inside a for loop when satisfying a condition
I usually get around this by having a second index which is advanced only with the condition. c = 1; % Index of 'Index' for j=...

6년 초과 전 | 1

| 수락됨

답변 있음
How do it store a particularText file into an array ?
I would suggest loading the file and then splitting. string = readfile('TestLists.txt'); lines = regexp(string,'\n','split');

6년 초과 전 | 0

답변 있음
"Unable to perform assignment because the size of the left and right side are not compatable... I am getting the following message: "Unable to perform assignment because the size of the left side is 1-by-47 and the size of the right side is 1-by-45"
I would first begin by converting the strings into a cell array. This alone shoud remove the error message. From there you can c...

6년 초과 전 | 0

답변 있음
Extract matrix from matrix
In general you should be able to do this with logic indexing fairly easily. I'm a little confused though how or why you have a 2...

6년 초과 전 | 0

답변 있음
Loop question (general programming)
I would suggest creating an array of the possible conditions you want. A = {'param'; 'm_param'; 'g_param'}; Then you can just ...

6년 초과 전 | 1

| 수락됨

답변 있음
How to find average of all maltab files in folder and write avrage of each file in single excel file.
You are receiving that error because you are trying to load the directory string, not the file. M = load(matFiles(k).name);

6년 초과 전 | 1

| 수락됨

답변 있음
read empty line by textscan
I'm going to guess that the extra lines are not consistent? Generally, I would suggest reading the entire file in as one string...

6년 초과 전 | 0

답변 있음
help with if conditional statement
I don't really understand all of what you're looking to do, but perhaps I can give some basic outline of how you can set up the ...

6년 초과 전 | 0

답변 있음
Extract rows an put them in a different array based on specific column values.
I'm a little confused what exactly you're looking for here, but hopefully I can at least get you started. To retain all rows wh...

6년 초과 전 | 0

답변 있음
How to create code to remove rows from a table
You're on the right track by using logic to identify whether a row contains a 0, but you would be better off marking different r...

6년 초과 전 | 1

| 수락됨

더 보기