回答済み
How to use logical indexing to change certain values in matrix
x(x==112)=225;

11年弱 前 | 4

回答済み
Converting unformatted text to formatted text
>> fmt='%*s%f%f%f'; >> fid=fopen('test4.txt'); >> c=cell2mat(textscan(fid,fmt,'headerlines',3,'delimiter','[]:','collect...

11年弱 前 | 0

回答済み
Reading unformatted text and converting to formatted
RFCH[0][0]:1, RFCH[0][1]:2, RFCH[0][2]:3, fmt='RFCH[%d][%d]:%d'; fid=fopen('yorfile'); c=cell2mat(textscan(fid,fmt,...

11年弱 前 | 1

回答済み
Saving responses to a matrix
What variable type is the response; numeric or character? If it's numeric you can simply write mat=[mat;[sim res]]; a...

11年弱 前 | 0

回答済み
How to plot XYZ data, so that the Z-components are plotted as large 'pixel' and have a color corresponding to their value.
Try scatter(x,y,25,z,'filled') Salt to suit on colormap, marker size, etc., etc., etc., ...

11年弱 前 | 1

回答済み
Which is the best method to find zero ? and choose the max value and plot a graph comproving the zeros.
>> fsolve(f1,sqrt(2)) Equation solved. fsolve completed because the vector of function values is near zero as...

11年弱 前 | 0

回答済み
Repeat elements in a 2D vector
I'm no image processing guru, but look at doc filter2 Mayhaps there a specific equivalent for image reconstruction in th...

11年弱 前 | 0

回答済み
Import Data from Text file
For that file you'll probably just as well off to process it line by line, parsing each line as needed... fid=fopen('yourfi...

11年弱 前 | 0

回答済み
How to import rows from a tab seperated .txt file containing a specific string?
80k lines with current memory available isn't all that big a file...simplest is to just read the whole file into memory, delete ...

11年弱 前 | 0

回答済み
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年弱 前 | 1

| 採用済み

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 1

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

回答済み
How to wait for an button event with a timeout?
doc pause

11年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 1

| 採用済み

回答済み
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年弱 前 | 1

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

回答済み
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年弱 前 | 2

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 1

さらに読み込む