Answered
how to find and add a matrix values from another matrix???
C=sum(B(1,A)); Open the online doc and under "Getting Started" read tutorial info on Array Indexing. I recommend working t...

11 years ago | 1

| accepted

Answered
sum column based on match in another column
[u,~,ib]=unique(Data(:,1)); % get the unique values and locations for each sx(:,i)=accumarray(ib,Data(:,6)); % sum ...

11 years ago | 0

| accepted

Answered
I can't put two lines in one legend on matlab in my plot
None of the above will work, the double quote is an illegal string delimiter in Matlab; it's a single quote (') instead. The ...

11 years ago | 0

Answered
Save different size cells to text file
>> for i=1:length(CELL) l=length(CELL{i}); fmt=[repmat('%8.3f',1,l) '\n']; fprintf(fmt,cell2mat(CELL{i...

11 years ago | 1

Answered
Spline interpolation, given a data set representing 6 points (xy-axis) of a snake's position at a given time
I've never used *csapi*, either, but it seems to be the anomaly in Matlab--it operates by row instead of by column as almost eve...

11 years ago | 0

| accepted

Answered
Matlab Error: Conversion to double from cell is not possible.
There's no reason for cell array to begin with.. % 1. Save two characters from var1 (starting from right-side to left-side)...

11 years ago | 1

Answered
How to wait for an button event with a timeout?
doc pause

11 years ago | 0

Answered
Frequency of FFT plot
See doc fft and the second section of the example showing how to get the one-sided PSD and frequency associated with the...

11 years ago | 0

Answered
sir, I want to convert hex string to hex, and convert to int16.
>> int16(hex2dec('f')) ans = 15 >> whos ans Name Size Bytes Class Attributes ans 1x1...

11 years ago | 0

| accepted

Answered
How to get the smooth curve data into an array after using Smoothing Spline?
Answered this a month ago on the newsgroup at <http://www.mathworks.com/matlabcentral/newsreader/view_thread/342845#939612> I...

11 years ago | 0

Answered
Exporting large number as string to an Excel (.xlsx) file.
_"I would still be interested to see why 'csvwrite' gives '1234600000000' as output"_ >> help csvwrite csvwrite Write...

11 years ago | 1

| accepted

Answered
Exporting large number as string to an Excel (.xlsx) file.
The first is a fignewton of the Excel display; Excel treats everything as a double unless you force it to be something different...

11 years ago | 1

Answered
Remove rows/text at the bottom of a csv file
OK, with the depth of the conversation under the original and that now have access to real data file I'm moving the last comment...

11 years ago | 0

Answered
Import too large csv data file with strings
Can't do anything w/o at least a sample of the data file with whatever warts there are as far as missing fields, but why not go ...

11 years ago | 0

Answered
skipping lines in double array
How's the date stored? If you have month,day,year and want rows of a given set of months, then select the ones desired by *isme...

11 years ago | 0

| accepted

Answered
Why do i get an error in this line function [outBits, outBytes] = ReadBinFile ('check.txt.lz')
For exactly the reason given--"function definitions are not permitted in scripts or at the command line". Not much else to say ...

11 years ago | 1

Answered
CSVREAD is returning a row of zeros for every other row
Your data were saved as a character string with a comma delimiter between fields within the strings. IOW, the first line looks ...

11 years ago | 2

Answered
CSVREAD is returning a row of zeros for every other row
Don't have your file for testing, but I think the RANGE argument is incorrect. Try S = csvread('S.csv',[0, 3, 47, 101]); ...

11 years ago | 0

Answered
How can I set the axis scale?
The original appears to have been plotted by creating the datapoints at the locations 2^N then plotted versus ordinal number, _n...

11 years ago | 0

Answered
Remove rows/text at the bottom of a csv file
Use find(strcmp(out{1},'DISCLAIMER')) to find the location in the cell array where the DISCLAIMER is located and then de...

11 years ago | 0

| accepted

Answered
average of range of values in a matrix
[u,~,ib]=unique(x(:,3)); % get the unique values and locations for each val=x(:,1:2); % shorthand for the subs...

11 years ago | 1

Answered
Why is NaN shown after fft is keyed in the command window?
Probably there's a missing value in the .csv file that was imported as NaN. What does all(isfinite(signaldata(:))) retu...

11 years ago | 1

| accepted

Answered
Reading in ascii files with white space as delimiter.
A"The better way..." x=textread('radiosonde.ascii','','headerlines',3); I hadn't noted before the symptom of repeated de...

11 years ago | 0

Answered
How can I find matching rows between two matrices and and retrieve a value to be applied to the matched row?
I don't think your desired result is consistent with your input... >> [A(:,6) B(ib,6)] ans = 2 0 3 1 ...

11 years ago | 0

| accepted

Answered
Zeroing the start of my vectors with a for loop
_"I have 6 vectors. Gauge1, Gauge2, Gauge3..."_ Don't name variables this way!!!! See the FAQ for why not: <http://matlab.wi...

11 years ago | 0

| accepted

Answered
How can I plot the coordinates of my data by using for loop
In Matlab, one generally avoids looping...once you've got the two starting positions and the number of points desired, then some...

11 years ago | 0

| accepted

Answered
Matlab while loop complicated function. Help me figure this out.
Write a combined logic test of the two conditions in the initial *while* statement. Since this is homework, a hint rather than ...

11 years ago | 0

| accepted

Answered
How to import excel file into a specific format in matlab
[x,hdr]=xlsread('yourExcelfile.xls'); will leave you with the numeric data in the array _x_ arranged as it is in the spread...

11 years ago | 0

Answered
I have problems with multi legends
First, save the handle to the legend on creation. Then, also save the line handles created by *plot* each time in an array and ...

11 years ago | 0

Answered
finding missing value using interpolation
Yeah, your second desired location is outside the range of the input and *interp1* won't extrapolate unless it's ordered to--use...

11 years ago | 0

Load more