回答済み
how do i use a vector has my input in matlab to find the quadratic equation of numbers
They already are if that's what you pass the function when you call it. Matlab is polymorphic; the argument variable in the fun...

6年以上 前 | 0

回答済み
Save file sizes not lining up
Any insight would depend upon knowing precisely what the "slice and dice" consisted of and the specifics of the struct There's ...

6年以上 前 | 0

| 採用済み

回答済み
Reading multiple txt data
txtfiles = dir('C:\Users\User\Documents\MATLAB\signal\signal*.txt'); ttrigger = dir('C:\Users\User\Documents\MATLAB\signal\trig...

6年以上 前 | 0

| 採用済み

回答済み
Not enough input arguments.
Looks disjointed in the error message but in function [N,B,Jac] = shapeQuadratic(x1,x2,x3,xi) there are four arguments require...

6年以上 前 | 1

| 採用済み

回答済み
how to plot data more than one time?
N=20; plot([0:N*numel(y)-1],repmat(y,1,N))

6年以上 前 | 0

回答済み
How can I run through an array and pick out certain values by condition
Start by finding locations of ix=[false diff(events)==1)] then locate the discontinuities in those stretches. Then it's the med...

6年以上 前 | 0

回答済み
Using Accumarray with @maxk instead of @max?
Don't see anyway around with accumarray because the VAL parameter must be 1:1 with rows of SUBS; use findgroups/splitapply or va...

6年以上 前 | 0

回答済み
Making decade time-series
roundyrs=fix(years(dt)/10)*10; n=histc(roundyrs,min(roundyrs):10:max(roundyrs)); results in >> [[min(roundyrs):10:max(roundyr...

6年以上 前 | 0

回答済み
How to plot bar chart with error bars
See <Answers Error-bars-in-bar-plot> and the other link there

6年以上 前 | 0

回答済み
Import many excel files to Matlab- How to?
"...they have very different names (city names) but all of them are in E:\test\ folder." Ok so just use the dir() solution (my...

6年以上 前 | 0

回答済み
How to read Binary from a txt file and assign it to row vector
Will have to read as char() and convert. For the one record, first cell... >> x=textscan(s,'%s %s %f'); >> A=str2num(char(x{1...

6年以上 前 | 0

| 採用済み

回答済み
how to convert mat file to tab delimited text file
load will load whatever variable(s) were stored in the .mat file into the workplace, using the name the variables have in the fi...

6年以上 前 | 0

回答済み
fprintf- I dont want to print one result.
A number of ways...one would be to include the fprintf statement in an if....end clause itself on value of N (or x). Another wo...

6年以上 前 | 2

回答済み
How to remove elements from the vector while we save the index of those removed elements?
That's simply the complement of the indices you saved...brute force is >> ix=1:numel(b); ix(1:3:end)=[]; >> ix ix = 2 ...

6年以上 前 | 0

回答済み
Sorting Data by Part of Column Name
This is basically trivial exercise for Matlab... >> t=readtable('DataDK.xlsx'); % read the file into table Warning: Variable ...

6年以上 前 | 0

| 採用済み

回答済み
how to ignore an index error?
H=[0 1 0;1 0 1; 0 1 0]; % filter coefficients u(2:end-1,2:end-1)=(c(2:end-1,2:end-1)+f...

6年以上 前 | 1

| 採用済み

回答済み
Delete specific rows from a cell array and create a new cell array
Place where converting the cell array to regular double array makes sense it would seem...there's nothing in the above data that...

6年以上 前 | 1

回答済み
Error using fprintf when copying cell content into a text file
Having data helps...to achieve the objective in the easiest way w/o writecell, use the intermediary of converting to a table... ...

6年以上 前 | 1

回答済み
error bars in bar plot with categories
This is a royal pain for even numeric axes; even worse for categorical. Complain to TMW about the sorry quality of implementati...

6年以上 前 | 0

回答済み
plot with points in file
Well, still kinda' difficult to figure out exactly what is wanted, but as near as I can make out, something like; t=readtable('...

6年以上 前 | 0

回答済み
Using loglog to plot results in a y axis that is not log scaled. But matlab seems to think it is
Set ylim([5 15]) to have sufficient part of the y-axis showing to be able to see the difference in the log scale vis a vis lin...

6年以上 前 | 0

回答済み
timeseries date data matlab
Either however you created the text file and/or imported it, you ended up with the datenum integer portion of the date/time info...

6年以上 前 | 0

| 採用済み

回答済み
I want to create multiple buffers one after the other. How do ensure that they show in a random order?
Simplest would be to create N objects in (say) a cell array. Then generated a randomized indexing vector as |randperm idxrand=...

6年以上 前 | 0

回答済み
char time: wrong label on years
The problem is the explicit four-digit string for the year -- that overrides any pivot year input for either datenum/datestr as ...

6年以上 前 | 0

回答済み
Using dir to extract the names of plexon files for upload
targetDir='WhteverisDirNeeded'; d=dir(fullfile(targetDir, '*.plx')); % return all files of desired extension for i=1:numel(...

6年以上 前 | 0

回答済み
Shuffle the rows a matrix
ir=randperm(1:numel(y)); % since y is 1D; otherwise use size(y,1) y=y(ir); x=x(ir,:);

6年以上 前 | 1

| 採用済み

回答済み
Summation of Infinity Terms
S = 0; tol = eps; term = inf; n = 1; If (x<1) 'not valid starting points enter another points' end while abs(term) > tol ...

6年以上 前 | 1

回答済み
Get every first value above a treshold out of an array
B=([0 diff((A>trsh)-1)]==1); For comparison, >> [A;B] ans = Columns 1 through 27 1 2 3 4 5 6 2 3 4 5 6 3 4 5...

6年以上 前 | 0

| 採用済み

回答済み
Data must be numeric, datetime, duration or an array convertible to double.
TimeX isn't defined in the above code snippet before or by reading the table so that's an inconsistency that should be dealt wit...

6年以上 前 | 0

回答済み
How to check if a table exists?
"...will be created by using the command "table"..." So, there then has to be a variable name on the LHS of the table() stateme...

6年以上 前 | 0

さらに読み込む