Risposto
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 ...

oltre 8 anni fa | 0

| accettato

Risposto
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 ...

oltre 8 anni fa | 0

| accettato

Risposto
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.

oltre 8 anni fa | 1

Risposto
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...

oltre 8 anni fa | 0

| accettato

Risposto
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...

oltre 8 anni fa | 0

Risposto
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...

oltre 8 anni fa | 1

| accettato

Risposto
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...

oltre 8 anni fa | 1

Risposto
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

oltre 8 anni fa | 0

| accettato

Risposto
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...

oltre 8 anni fa | 0

Risposto
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 = ...

oltre 8 anni fa | 0

| accettato

Risposto
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'))

oltre 8 anni fa | 0

| accettato

Risposto
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...

oltre 8 anni fa | 2

| accettato

Risposto
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...

oltre 8 anni fa | 0

| accettato

Risposto
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...

oltre 8 anni fa | 0

Risposto
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...

oltre 8 anni fa | 2

Risposto
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...

oltre 8 anni fa | 0

Risposto
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); ...

oltre 8 anni fa | 0

| accettato

Risposto
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,...

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 1

Risposto
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...

oltre 8 anni fa | 0

Risposto
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 ...

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

Risposto
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> ...

oltre 8 anni fa | 0

Risposto
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...

oltre 8 anni fa | 0

| accettato

Risposto
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))

oltre 8 anni fa | 0

Risposto
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...

oltre 8 anni fa | 1

Risposto
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...

oltre 8 anni fa | 0

Risposto
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...

oltre 8 anni fa | 0

Risposto
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...

oltre 8 anni fa | 0

| accettato

Risposto
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 ...

oltre 8 anni fa | 0

| accettato

Carica altro