回答済み
how to read a file like a table
Use *textscan* without an explicit format string--that's a magic incantation that will return the data in the same shape as is i...

約10年 前 | 0

| 採用済み

回答済み
If any statement is written like this x(x<R)=0; and we have to plot this statement then how is this possible?
Set the unwanted points to NaN; *plot* and friends silently ignore those. This solution will leave breaks in the line, however,...

約10年 前 | 0

回答済み
Multiple subplots with one dynamic super title using annotation
*annotation* doesn't have the facilities of *sprintf*, etc., you've got to build the string annotation('textbox', [0 0....

約10年 前 | 0

| 採用済み

回答済み
How to make plots of the differences: x(t) – xorginal(t) vs time
plot(t,x–xorginal) Surely there's more to the ? than this???

約10年 前 | 0

回答済み
Include Newline in Textscan
Pretty bizzaro request: _"Line 2 (blank) should not show up in the imported array. Only lines 1, 3, 4 (blank), 5, and 6 (blank) ...

約10年 前 | 1

回答済み
How to make input parameters in m.file and use another function file to write the code, and ask paramters from m.file?
Think of two possible solutions-- # Simpler would be not to use m-file but a data file that contains the data and simply read...

約10年 前 | 0

回答済み
Make a graph with data from all sheets in excel
Sure, just use *xlsinfo* to return the sheet names in the spreadsheet and iterate over that collection. See doc xlsfinfo ...

約10年 前 | 0

| 採用済み

回答済み
Hello, any one help me, How can I write the expression and statements for these equations
Just as it's given, pretty much... G_d = function(G,kt) if kt<0.22 G_d = G*(1-0.09*kt); elseif 0.22<=kt<=0.80 ...

約10年 前 | 0

回答済み
How to devide a line passing through two points into equal segments?
For straight line it doesn't matter; just divide dx, dy by the number of intervals. xpts=linspace(x(1),x(end),N); ditto ...

約10年 前 | 0

回答済み
line thickness issue, LineWidth acts as an integer
There's inevitable granularity owing to the screen being finite number of pixels. For a default figure here, the resolution wor...

約10年 前 | 0

| 採用済み

回答済み
Whats wrong with this code?
Trying to run it, I get-- ... Error using chi2inv (line 22) Requires two input arguments. >> Don't know what th...

約10年 前 | 0

| 採用済み

回答済み
Fortran MEX using Cell arrays - crashing Matlab..
Subroutine compute is Fortran, don't need (and can't use) %VAL on the arguments; they'll be handled just like any other Fortran ...

約10年 前 | 0

回答済み
Format short - how does it work?
Per the _"Algorithms"_ notes in the doc, _"If the largest element of a matrix is larger than 103 or smaller than 10-3, then MAT...

約10年 前 | 1

| 採用済み

回答済み
How to create letters, numbers and special characters
It'll have to be a string; Matlab can't store different types in the same array excepting as separate cells in a cell array. ...

約10年 前 | 0

回答済み
How can I change the line color (e.g. 'color','g' doesn't work)
As Azzi says, it's hard to debug w/o data and would take a fair amount of work to make stuff fit your code but one thing I notic...

約10年 前 | 1

| 採用済み

回答済み
How can I display celcius up the left hand axis and farenheit on the right hand axis pof a temperature graph?
Yeah, but you can't make 'em line up in general...try the following for the idea-- plot(-40:10:212) % just a line to get a...

約10年 前 | 2

回答済み
How to store the regression coefficients and std.errors of the slope only (but not intercept)?
According to the doc, the coefficient vector is third output argument, not first... [~,SE,Coeff] = hac(mMatrix(:,k),mMatrix...

約10年 前 | 0

| 採用済み

回答済み
using plot with 2 x and 2 y axis
Just use *plotyy* and fix the initial result up a little...example x=[[1:10].' [1:10].'-5]; y=[randn(10,2) randn(10,2)];...

約10年 前 | 0

| 採用済み

回答済み
reading txt file and converting hex to decimal and plotting
nCol=4; % number of columns fid=fopen('data.txt','r'); M=fscanf(fid,'%2x',[nCol,inf]).'; fid=fclose(fid); I can't ...

約10年 前 | 0

回答済み
how to use the "tight" function for just one axis
Not at hand, but it's not difficult to do... function ytight(ax) % Set axis tight only on y-axes yl=xlim(ax); % r...

約10年 前 | 1

| 採用済み

回答済み
Why am I getting "Dimensions of matrices being concatenated are not consistent." after 53 successful reads?
It fails after the 53rd record because the format changes... ... 49 8.5713 7.0532 6.9459 6.6719 6.915 6.9 6.9 7.4...

約10年 前 | 0

| 採用済み

回答済み
Can not use categorical string values to generate strings for title, Error: 'getVars' for input arguments of type 'categorical'
Use *char* to convert to character string...

約10年 前 | 0

| 採用済み

回答済み
Can anyone show me how to semi-log the y-axis of a dendrogram plot so as the y-axis is plotted in a logarithmic scale?
Don't have so can't test, but isn't set(gca,'yscale','log') all you need do?

約10年 前 | 0

回答済み
How can I make a title/label bold and large in LaTeX?
Only partial answer; I've never been able to figure out what does/doesn't work w/ the TMW TeX/LaTeX implementations but the docu...

約10年 前 | 2

| 採用済み

回答済み
How do I store text data I read from a file line by line into an Array
_"I was hoping tline is an array ..."_ In tline = fgets(fid); Well, it _is_ and array, just not the array you were h...

約10年 前 | 0

回答済み
How to use string for a graph legend
The expression as you've written it for string generates a list, _not_ an array which is what you need to match up with the line...

約10年 前 | 0

| 採用済み

回答済み
How do I plot a secondary y-axis in log scale?
>> help plotyy plotyy Graphs with y tick labels on the left and right plotyy(X1,Y1,X2,Y2) plots Y1 versus X1 with y-axi...

約10年 前 | 0

回答済み
Need Help for creating constraint with If conditions
No loops needed...given your above array as _m_, >> ix=m(:,2)==1; >> b=m(ix,3)-m(ix,4) b = 4 8 6 >> ...

約10年 前 | 1

| 採用済み

回答済み
textscan formatting to import a large text file
Presuming you have a way to generate the column-wanted vector, build the format string dynamically >> c=[1,162,166 ,209,240...

約10年 前 | 0

回答済み
Please how can I unstack a column of negative and positive values into 2 columns of positive and negative values respectively?
p=sr(sr>0); % positive only n=sr(sr<0); % negative only, you'll have to decide where zero goes if it exists... or, ...

約10年 前 | 0

| 採用済み

さらに読み込む