已回答
Using a variable as both output and input and writing a condition in a function
When you write function [lamda, lambdap,phip] = Palaeomagfun(I ,lamda,lamdax,phix ) lamda=atand(tand(I)/2) %in degree ...

8 years 前 | 0

| 已接受

已回答
How can I plot polar plot from -pi to pi instead of 0 to 2*pi?
What error do you get? I tried the below and I don't get any error. theta = linspace(-pi,pi,25); rho = 2*theta; p ...

8 years 前 | 0

| 已接受

已回答
Multiply 4D array with 2D array without a for loop
Try this, bsxfun(@times,S(:,:,1,:),C) but remember, the result you'll get as a 3D matrix.

8 years 前 | 1

已回答
Map a matrix 300 cells of matrices to a 2d matrix
dummy = repmat({reshape(1:784,28,28)},1,300); C = cell2mat(cellfun(@(x) [x(:)],dummy,'uni',0)); or simpler, C = resh...

8 years 前 | 0

| 已接受

已回答
Help with loops calculating value
I don't clearly understand what you're trying to do but it looks like you may want to use a while loop, while abs((I-Iold)/I...

8 years 前 | 0

已回答
Save multiple run result of script
*EDITED* numOfRuns = 5; for n=1:numOfRuns s = fitness(D,vect); save(['result_data_run_number_' num2str(n) ',ma...

8 years 前 | 1

| 已接受

已回答
Sort a matrix according to the index of a vector
if you want to sort the rows of |D| according to isort, try newD = D(isort,:) newD = 0 0.8000 0.2...

8 years 前 | 1

已回答
Find Index Positions of a Small Array values in a Global Array
G = [1; 4; 6; 9; 13; 17; 26; 33; 47]; S= [6; 26; 47]; find(ismember(G,S)) ans = 3 7 9

8 years 前 | 0

| 已接受

已回答
Two x-axis for the same plot line
If you have R2014b or later, just like utilizing both sides of the y axis, you can also use top and bottom side of x axis. re...

8 years 前 | 0

已回答
How to make a variable content part of a path
filepath = '/Users/Y*****/Downloads/case_data/train2/3'; filename = 'file001.txt'; and then use fullfile fid_out = ...

8 years 前 | 0

| 已接受

已回答
how to call number inserted in "edit text" into the formula that i have code in "push button" for GUI?
use |get|, S = str2double(get(editBoxHandle, 'string'))

8 years 前 | 0

| 已接受

已回答
How do i put in a bar group the value of each bar on top?
Try this, Y_as = [ 165 160 121 ; 59 84 62 ; 106 76 58 ] ; X_as = categorical({'1. apples & pears' , '2. apples', '3. pea...

8 years 前 | 2

| 已接受

已回答
How to compare real time with an entered time in a table cell in guide GUI?
you can get the current time by using, >> curr_time = datetime('now') curr_time = datetime 2017...

8 years 前 | 0

| 已接受

已回答
Need help with determining proper function input dimensions
Without knowing what the function does or supposed to do it's hard to guess. There are also many other undefined functions insid...

8 years 前 | 0

已回答
Why won't matlab produce any output in the command window?
If you use semcolon *(;)* by the end of your command, the output on the command line will be suppressed. If you want to see a ma...

8 years 前 | 2

已回答
Incrementing File names access
If your text files are in the same folder, then use |dir|, <https://www.mathworks.com/help/matlab/ref/dir.html> folderInf...

8 years 前 | 0

已回答
Removing specific elements from vector
Your question is not very clear. First you're defining, |M,K,N| and |F|, M=32; K=1; N=M-K; F=exprnd(1,1,M); ...

8 years 前 | 0

| 已接受

已回答
Pass data from figure to main GUIDE pushbutton callback function
You need to update the hObject handle using, guidata(hObject,handles); Upon edit, save the new table data in this handle,...

8 years 前 | 1

| 已接受

已回答
Title with multiple outputs
Try this, title(['k = ' num2str(k) ' t/T = ' num2str(t/T) ' \theta_p = '... num2str(theta_p) '\circ C_{\Upsilon} = '...

8 years 前 | 1

已回答
Trouble creating an element-wise nested structure: Subscripted assignment dimension mismatch
Instead of storing 3 vectors for each joints, I'd recommend using a 3x3 matrix. Place it in a structure with more meaningful nam...

8 years 前 | 0

已回答
How can I eliminate this error?
_How can I elmiate this error?_ Simple. Provide an input of supported format. The error message even specifies the supported ...

8 years 前 | 0

已回答
How Can I Create Figure Like Bar
how about a stacked bar? <https://de.mathworks.com/help/matlab/ref/bar.html> bar(data,'stacked')

8 years 前 | 0

已回答
Wiered Matlab Matrix Multiplication
it is coming from M*[ddtheta1; ddtheta2] + C + G if you do not put a <https://en.wikipedia.org/wiki/Semicolon semicolon> ...

8 years 前 | 0

已回答
Place a pushbutton on uitable to display new input data
set the |ColumnEditable| property true t.ColumnEditable = [true true]; and place a pushbutton on the figure and use its c...

8 years 前 | 0

| 已接受

已回答
How can I extract all values in a row of an array without the its maximum value
A = [5 3 9 10]; res = A(A~=max(A))

8 years 前 | 0

已回答
Nesting function trouble with undefined variable
You're passing |d|,|e| to |nesty| function but you're using |a| on the right hand side of the equation. Do not expect matlab to...

8 years 前 | 1

已回答
How can I change the scale of y axis from figure 1 to figure 2
Use handles. f1 = figure(1); h1 = plot(rand(3)); ax1 = gca; f2 = figure(2); h2 = plot(rand(5)); ax2 = gca; n...

8 years 前 | 0

已回答
If I have a vector A with dimensions (1,3) and an other vector with dimensions B (3,1) , then the action A.*B is a matrix with dimensions (3,3) or a vector with dimensions (3,3) ?
I think you're confused with the terms, vectors and matrices. *Vectors or Arrays* These are one dimensional. They either h...

8 years 前 | 0

已回答
how to call the data in matrix with the same value in one column
first get all the unique values of column 4 using, vals = unique(A(:,4)); then use indexing to filter, A(A(:,4)==va...

8 years 前 | 0

| 已接受

已回答
How to get index of each points in data?
Simply use sortrows, >> [B,index] = sortrows(A,4) B = 999 999 999 11 111 111 111 22 ...

8 years 前 | 0

| 已接受

加载更多