Answered
Can anyone write a mathlab program for this question
Yes. I can write a Matlab program to solve that problem. Try this.

5 years ago | 0

Answered
combin 4 three dimential matrices in one matrix
You cannot directly combine a 5x3x10 and a 2x2x10 matrix into a 7x5x10 matrix within Matlab because the direct combination of ma...

5 years ago | 2

| accepted

Answered
Add a column in a CSV file
The best way to do this is to read the entire file in with csvread, add your column to the matrix, and then reprint the file wit...

5 years ago | 0

| accepted

Answered
Read specific data columns from a text file based on header name requested by user
I started to work on this, and realized that with my knowledge the code was going to be pretty ugly. If anybody knows a way to c...

5 years ago | 1

Answered
How do I split a text file at specified points?
% Load the file file = fileread('mytextfile.txt'); % Split the data at $ data = regexp(file,'.logE','split'); You may end ...

5 years ago | 0

| accepted

Answered
Matlab using regexp function i want to parse string and data
There are a few things I notice here. 1) I have edited your patterns so they should capture what you're looking for. 2) It see...

5 years ago | 0

| accepted

Answered
coupling of coorresponding sheets of excel files
There are two ways of doing this. You can either use xlsread and load each set of data into matlab one sheet at a time, or you c...

5 years ago | 0

| accepted

Answered
Plots in excel sheets using matlab
If you want to create a plot in the excel sheet directly you need to use the ActXServer capability. Here is a brief layout of w...

5 years ago | 3

| accepted

Answered
How can I extract data from a structure? I keep getting "The class struct has no Constant property or Static method named 'strains'." error
ans.strains The 'struct with fields' is the standard output line that tells you the class of the variable you just viewed, 'ans...

5 years ago | 0

| accepted

Answered
How can I save structures from a cellarray into individual .mat files with a loop?
It is saving all of the data because you are not indexing your save selection. save(c_string,'datacut'); You will need to crea...

5 years ago | 0

| accepted

Answered
problem regarding limits of y and x-axis
It seems like all you need to do is change the axis range. This can be done manually in the figure window. Open the 'Edit' men...

5 years ago | 0

Answered
How to optimize this for loop?
v0(v0<=2) = 0; v0(v0>=26) = 0; v0(v0>=120) = 12; Should work for all three, because they're apparently the same with differen...

5 years ago | 0

Answered
How to solve "Subscripted assignment dimension mismatch" error?
That is almost guaranteed to mean that 'i' is not a positive integer, or, more likely, that CL(i).id is not a positive integer. ...

5 years ago | 0

Answered
Multiple lines in single cell
If I am understanding you correctly, you want to use to combine your strings into a single string, but maintain the individual r...

5 years ago | 0

Answered
Import files into Matlab and compare values
The dates and times of the spreadsheet are in separate columns, and I can't import the times as times (they are imported as numb...

5 years ago | 0

Question


Can anybody explain the interaction of Wilkinson and unique?
I was working on one of the Cody questions, and encountered the wilkinson function. In working to solve the problem I was utiliz...

5 years ago | 1 answer | 0

1

answer

Answered
How can I plot a certain range of data?
You said you have two scripts. How are you running your two scripts? Are you running them separately, or are you running them in...

5 years ago | 0

Answered
Help sorting out for loop/if statement code to create a figure
fig2=figure (2) c=0 for i=8:1:38 for t=1:1:numel(SpikesAll(i)) if isnan(SpikesAll(t,i)) break ...

5 years ago | 0

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

Answered
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 (...

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 1

| accepted

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

5 years ago | 0

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

5 years ago | 1

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

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

5 years ago | 0

| accepted

Load more