回答済み
I am not getting correct answer of following hexadecimal addition and sustraction
Oh, I think you're getting the correct answer, you just didn't write the code for the desired problem! :) k=num2str(dec2he...

10年弱 前 | 0

回答済み
How do I count vectors with a specified value in an array of equal length vectors in Matlab?
Presuming the phrase _'array of vectors'_ means a 2D "ordinary" array, arrange them by column and then the answer is simply ...

10年弱 前 | 0

| 採用済み

回答済み
i'm trying to disply ht vs time in a plot, but the graph is ending up blank, what am i doing wrong.
Several issues...first, how are you trying to use the function? If you call it in a loop over some time interval with individua...

10年弱 前 | 1

| 採用済み

回答済み
naming matrix with a specific pattern
Possible but _a_very_BAD_idea_(tm) indeed. How are you going to write the consumer of this function if you have 50 separate out...

10年弱 前 | 1

回答済み
How to use loop function to find the 1st to Nth elements' average, and then 2nd to Nth element's average? Thanks
Navg=120; % number for moving average krnl=ones(N,1)/N; % convolution kernel over N...

10年弱 前 | 0

| 採用済み

回答済み
How to find which column consists character 'example' in cell c{1,2}(:,1)
So many possibilities of how things can be stored in cell arrays likely need a small example to see just what your arrangement a...

10年弱 前 | 0

回答済み
i made a script and it changed but i dont know how and why
You somehow managed to use the m-file name as the target of a *save* operation and overwrote the script with a .mat file. In ot...

10年弱 前 | 1

回答済み
convert decimal to binary (for whole column)
doc dec2bin % for details...

10年弱 前 | 0

回答済み
why I am having this "Cell contents assignment to a non-cell array object."error?
_data_ must be an existing array of *double* or other non-cell type already. clear data before beginning the script.

10年弱 前 | 0

| 採用済み

回答済み
How to create a matrix P containing the coordinates (xi,yi) as columns
P=[x y]; % x,y column vectors of same length P=[x; y].'; % x,y row vectors of same length

10年弱 前 | 0

回答済み
Using the exist function, on a user defined variable in a function.
Use *inputname* to find the name of the variable passed to the function and check its existence. But, of course, it has to have...

10年弱 前 | 0

回答済み
How can you split a table (or array) based on similar values in a column?
# is most simply accomplished by first doing (you guessed it...) # sort by id Once you've done that, then simply find the po...

10年弱 前 | 0

回答済み
reading text from various positions
Essentially other respondent's solution with a few shortcuts along the way of not building the intermediaries primarily...althou...

10年弱 前 | 0

回答済み
Find match for a pair of rows in cell arrays
Adam's on the right track, just didn't quite recognize the problem description-- >> ab=[char(alfa) char(beta)]; % mush the...

10年弱 前 | 0

| 採用済み

回答済み
Opening a .csv file from command line
*uiimport*

10年弱 前 | 1

| 採用済み

回答済み
problem with dialog text box
If you mean a uicontrol textbox, they're static controls and users cannot change text interactively. You can only programmatica...

10年弱 前 | 0

回答済み
Matching data and time with sample number
Find the elapsed time and convert to number of samples-- >> t0='11/19/2015 18:00';target='11/20/2015 6:34'; % given exampl...

10年弱 前 | 0

| 採用済み

回答済み
I am trying to create a function form a vector from my matrix and I do not understand where my mistake is?
_"...transform my matrix into a vector"_ Really don't need a function for this; Matlab has syntax to do it already. A previo...

10年弱 前 | 0

回答済み
How do I append data to an existing datafile? I don't want to overwrite any data, just simply add to it - is there a specific append or concat function i can use?
In what form does this file exist? In general, for text files you can use *fopen* w/ the append mode switch but you'll have to ...

10年弱 前 | 0

回答済み
plotyy with bars side by side
Not sure exactly what you're trying to show, but try the following for starters-- x=x.'; y1=y1.'; y2=y2.'; % needs must...

10年弱 前 | 0

回答済み
Why won't hold on work in this code?
Work out some trig identities but note that >> x=[-6*pi:12*pi/100:6*pi]; % define a commensurate range of x consistent w/ ...

10年弱 前 | 0

| 採用済み

回答済み
deleting rows using setdiff?
For what you're looking for, *ismember* is better than *setdiff* -- x=[2;1;5;6;8]; y=[1;2;5;6]; % wanted values of ...

10年弱 前 | 0

回答済み
Using the deviation of a linear regression calculation to trim the calculated data in the linear regression itself.
As John says, it may not work well for all data sets but for the above that is quite clean, >> xy=[... -58.402504309519...

10年弱 前 | 0

回答済み
how to count identical elements in a non-symmetrical matrix?
>> x = [ 0 1 1 0 ; 1 0 0 1 ; 0 0 0 1 ; 1 1 0 0] >> [[1:4].' sum(x.*x.',2)] ans = 1 1 2 2 ...

10年弱 前 | 0

| 採用済み

回答済み
h = mod(prod(uint8('Welcome42')),2^24-3); returns the wrong result ?
prod('Welcome42') overflows a double which is the default output type unless 'native' is given as optional argument. Plus, cert...

10年弱 前 | 0

回答済み
how can i convert 8760 hourly data to ten minute data ?
Find the underlying database and resample it, perhaps? If you don't have finer granularity than hourly samples, there's nothi...

10年弱 前 | 0

| 採用済み

回答済み
How do I get the sum for every i = 1: N-1?
To begin with, don't use multiple variables to hold a single variable; use an array instead. Then simply reference the desired ...

10年弱 前 | 0

回答済み
Error using ==> eval
_*DON'T DO THIS!!!*_ See <http://www.mathworks.com/help/matlab/matlab_prog/generate-field-names-from-variables.html <generate-f...

10年弱 前 | 0

回答済み
fitting a negative exponential function to a profile
fnz=@(b,x) = b(1) + (b(2)-b(1))*exp(-b(3)*(x-b(4)); b=nlinfit(x,y,fnz,b0); where you've estimated an initial starting va...

10年弱 前 | 0

回答済み
I plotted time series electricity load data in matlab and then used matlab "basic fitting" tools for best fitting. Now i require the values of the best fitted curve, is there a way to extract these values using a code or any other way??
Well, the ease of the tool comes at something of a price; it doesn't have the ability to automatically return everything you've ...

10年弱 前 | 1

| 採用済み

さらに読み込む