回答済み
Linear Interpolate to n equally spaced points
doc interp1 >> v=[0 5 10 5 0]; L=length(v); >> interp1(1:L,v,linspace(1,L,15)) ans = Columns 1 through 10 ...

11年弱 前 | 0

| 採用済み

回答済み
Take a vector of numbers, and convert them to a string and store in a single cell?
If you leave as string, can't put in the numeric array; would have to use a cell array instead. OTOH, if you convert to the str...

11年弱 前 | 1

回答済み
Problems using importdata function
Has to be there's something not being shown...like a variable set in the workplace that isn't in the script (which makes me wond...

11年弱 前 | 0

回答済み
How to plot line with different line style part way through?
# Put each device x,y data in a separate column in an array and call *plot* Each column will automagically be a new line with c...

11年弱 前 | 0

回答済み
How to remove empty matrix : 1 by 0 in my code
You didn't provide an output argument to either function doc function % for details

11年弱 前 | 0

回答済み
I want to get/search for all of the ".mat" files in an exact directory and all of the subdirectories within. How can I get all of the subdirectories and subfiles to my variables list?
Simpler way is to use the OS directory search...for Windows s=uigetdir; % initial subdirectory [~,d]=dos(['dir /s /b...

11年弱 前 | 0

回答済み
How can I import ordered pairs of data from a text file?
Alternatively to Per's "most excellent" answer and perhaps a little easier for the neophyte to see on the format string-- d...

11年弱 前 | 0

| 採用済み

回答済み
Extract elements of the array using any
Problem is you need to keep the length of the logical vector the same as the original length; *diff* shortens it by one without ...

11年弱 前 | 0

回答済み
Taking a lot of time to solve an expression
Don't have the symbolics so "know nuthink!" on that side but >> fn=@(y) 3.591*y*(1-y)^0.77-0.125; >> yz=fsolve(fn,0.5) ...

11年弱 前 | 0

| 採用済み

回答済み
Set an empty cell array equal to zero.
Actually, the cell array itself is _not_ empty, it holds an empty array. And, empty isn't a string value anyway so that compari...

11年弱 前 | 0

| 採用済み

回答済み
converting from fortran code to matlab
'$' isn't a legal Fortran character (nor is it allowed in a Matlab variable name); you'll have to fix that up. I don't know whe...

11年弱 前 | 0

回答済み
Group-wise mean in multi-dimentional array
_"cell array of the dimension 1 x 121 x 515. It represents 515 sets of 1 x 121..."_ First, why the complication of a cell arr...

11年弱 前 | 0

| 採用済み

回答済み
Display Error message limit of chars
You've misdiagnosed the problem. The issue isn't the internal message is too long, it's that you've displayed the _*MException*...

11年弱 前 | 0

回答済み
Is this works in Matlab?! K = (N==INFECTED_A1) + (E==INFECTED_A1) + (S==INFECTED_A1) while INFECTED_A1=1. How can I get K=3?!
Have to use paren's to get proper precedence-- K =(N==INFECTED_A2) + (E==INFECTED_A2) + (S==INFECTED_A2);

11年弱 前 | 0

| 採用済み

回答済み
Finding values on a graph
If you plotted the two graphs, you already have the values; why isn't it simply dyEnd = y2(end) - y1(end); % ?? In ...

11年弱 前 | 0

回答済み
Looking within search path for a directory containing a chosen string
Probably not a whole lot unless... _*IF*_ the subdirectories were to be on a given higher level path branch, then one could p...

11年弱 前 | 0

| 採用済み

回答済み
Selecting rows from a file starting with a letter followed by 3 numbers
Indeed, per the doc for *strcmp* and friends, they "know nuthink!" about regular expressions. Use *regexp* instead. if reg...

11年弱 前 | 0

回答済み
Power Regression - Matlab vs Excel
Didn't show your work in Excel so can't judge what went on there, but I don't know why you'd choose that model over the Matlab r...

11年弱 前 | 0

回答済み
Read multiple excel files in matlab and combine them in one file
Nothing particular to it; simply read the two file sequences into separate variables and merge those as desired. It isn't clear...

11年弱 前 | 0

回答済み
xlsread with range of a column from specific row till the end
There is no Excel syntax expression equivalent to Matlab _:end_ array references, no. Read the column and trash the unwanted ...

11年弱 前 | 1

| 採用済み

回答済み
How to restrict the Max Peak Height of findpeaks
You're correct there is no such facility built into *findpeaks*--one would normally think a large peak would be _agoodthing(tm)_...

11年弱 前 | 0

回答済み
Write a function that displays the next day when you input the previous day in vector form i.e. [mm dd yyyy]
A beginning...first use some variables that make some mnemonic sense... function [m d y] = next_day(m, d, y) d=d+1; %...

11年弱 前 | 0

回答済み
Selecting rows from a file starting with a letter followed by 3 numbers
Not much can do w/o data file, but you can do what we can... doc debug Set a breakpoint and work thru the function to se...

11年弱 前 | 0

| 採用済み

回答済み
How to normalize measured data?
Unless the timing is grossly out, probably doc interp1 is about as good a job as you can do.

11年弱 前 | 0

| 採用済み

回答済み
how to plot winter rainfall data with trend line
y=[78:81].';r=[17 29 8 4].'; plot(y,r) b=polyfit(y,r,1); rhat=polyval(b,y); hold on,plot(y,rhat,'r') set(gca,'x...

11年弱 前 | 0

回答済み
How do I pas one scalar from a function that outputs an array?
Is no Matlab syntax to do that directly; use an intermediate temporary variable to hold the result. If _must_ have a function...

11年弱 前 | 0

回答済み
Make subplot span across multiple slots
Sure, just save a handle as there's not a unique number for any of 'em if do it this way...as long as you don't overwrite an exi...

11年弱 前 | 6

| 採用済み

回答済み
Import data from several .xlsx and different columns
Looks way too complicated -- something like [~,txt]=xlsread('C:\...\reference.xlsx'); for i=1,size(txt,1) C1C2=[txt...

11年弱 前 | 0

| 採用済み

回答済み
Create for loop to read in multiple excel files
See the FAQ <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F How can I process a sequence of files?> ...

11年弱 前 | 0

さらに読み込む