Hi,
I am working on a solution of following problem:
I will get two values of two different resistances, say R1 and R2 from another programm.
For this 2 resistances, I have to look for an actual existing value from 4 different given series, which I have stored in a xls file.
The first thing I want to do is compare the resistance with the values in the xls file.
I tought the easiest way to do it was to divide the value of the given resistance with the value of the resistance which we are looking for, in this way:
(Rnorm/R1 -1)^2
Rnorm represents the value of the resistance in the xls file.
This is so far my programm:
function [ Rnormiert ] = Widerstaende( input_args )
%Widerstaende Summary of this function goes here
% Detailed explanation goes here
[num,txt,NUMERIC]=xlsread('Widerstandsreihe.xlsx')
R12=NUMERIC(:,1)
R24=NUMERIC(:,2);
R48=NUMERIC(:,3);
R96=NUMERIC(:,4);
i = 1;
Rnormiert = 0;
R = zeros(643,1) +1;
%später muss R variable sein
R12neu=R/R12
and when I run it I get following error:
??? Undefined function or method 'mrdivide' for input
arguments of type 'cell'.
Error in ==> Widerstaende at 14
R12neu=R/R12
Could anyone please help me? I gess it has something to do with the kind of data I'm dividing, but like I said, I'm a beginner at Matlab.
Thanks!
Patrick
|
|
0
|
|
|
|
Reply
|
Patrick
|
12/15/2010 9:57:04 AM |
|
On Dec 15, 1:57=A0am, "Patrick Schmitt"
<patrickbateman12...@googlemail.com> wrote:
> Hi,
>
> I am working on a solution of following problem:
>
> I will get two values of two different resistances, say R1 and R2 from an=
other programm.
>
> For this 2 resistances, I have to look for an actual existing value from =
4 different given series, which I have stored in a xls file.
>
> The first thing I want to do is compare the resistance with the values in=
the xls file.
>
> I tought the easiest way to do it was to divide the value of the given re=
sistance with the value of the resistance which we are looking for, in this=
way:
>
> (Rnorm/R1 -1)^2
>
> Rnorm represents the value of the resistance in the xls file.
>
> This is so far my programm:
>
> function [ Rnormiert ] =3D Widerstaende( input_args )
> %Widerstaende Summary of this function goes here
> % =A0 Detailed explanation goes here
> [num,txt,NUMERIC]=3Dxlsread('Widerstandsreihe.xlsx')
> R12=3DNUMERIC(:,1)
> R24=3DNUMERIC(:,2);
> R48=3DNUMERIC(:,3);
> R96=3DNUMERIC(:,4);
>
> i =3D 1;
> Rnormiert =3D 0;
> R =3D zeros(643,1) +1;
> %sp=E4ter muss R variable sein
> R12neu=3DR/R12
>
> and when I run it I get following error:
>
> ??? Undefined function or method 'mrdivide' for input
> arguments of type 'cell'.
>
> Error in =3D=3D> Widerstaende at 14
> R12neu=3DR/R12
>
> Could anyone please help me? I gess it has something to do with the kind =
of data I'm dividing, but like I said, I'm a beginner at Matlab.
>
> Thanks!
>
> Patrick
to 'divide' 2 vectors, you can use A ./ B (i.e. element by element
division).
--Nasser
|
|
0
|
|
|
|
Reply
|
Nasser
|
12/15/2010 10:23:39 AM
|
|
|
1 Replies
674 Views
(page loaded in 0.236 seconds)
Similiar Articles: Problem dividing two vectors - comp.soft-sys.matlabProblem dividing two vectors - comp.soft-sys.matlab Convert from std_logic_vector to real - comp.lang.vhdl In this case, convert to integer, divide by 2**8 and assign ... merging two vectors - comp.soft-sys.matlabProblem dividing two vectors - comp.soft-sys.matlab merging two vectors - comp.soft-sys.matlab Problem dividing two vectors - comp.soft-sys.matlab Problem dividing two ... adding vectors of different length - comp.soft-sys.matlab ...Problem dividing two vectors - comp.soft-sys.matlab adding vectors of different length - comp.soft-sys.matlab ... Problem dividing two vectors - comp.soft-sys.matlab ... Convert from std_logic_vector to real - comp.lang.vhdlProblem dividing two vectors - comp.soft-sys.matlab Problem dividing two vectors - comp.soft-sys.matlab Convert from std_logic_vector to real - comp.lang.vhdl In this case ... Precision problem with xlsread - comp.soft-sys.matlabProblem dividing two vectors - comp.soft-sys.matlab Precision problem with xlsread - comp.soft-sys.matlab Problem dividing two vectors - comp.soft-sys.matlab XLSREAD ... split the vector in n subvectors - comp.soft-sys.matlab... with subsets - comp.soft-sys.matlab split the vector in n subvectors - comp.soft-sys.matlab problem with subsets - comp.soft-sys.matlab Suppose I have the vector > N={1 2 ... problem with subsets - comp.soft-sys.matlabProblem dividing two vectors - comp.soft-sys.matlab I have a set of vectors, for all n from 1 to N (N is about 5,000 ... divide ... problem with subsets - comp.soft-sys ... Vector-values functions slow? - comp.lang.fortranProblem dividing two vectors - comp.soft-sys.matlab Vector-values functions slow? - comp.lang.fortran Problem dividing two vectors - comp.soft-sys.matlab... problem: I ... The Round function in Matlab - comp.soft-sys.matlabRounding/Merging - comp.soft-sys.sas Problem dividing two vectors - comp.soft-sys.matlab The Round function in Matlab - comp.soft-sys.matlab Hey If I use the round function ... Logic problem - comp.soft-sys.matlabProblem dividing two vectors - comp.soft-sys.matlab Problem dividing two vectors - comp.soft-sys.matlab Convert from std_logic_vector to real - comp.lang.vhdl In this case ... Problem dividing two vectors - comp.soft-sys.matlab | Computer GroupProblem dividing two vectors - comp.soft-sys.matlab Convert from std_logic_vector to real - comp.lang.vhdl In this case, convert to integer, divide by 2**8 and assign ... Problem dividing two vectors - Newsreader - MATLAB CentralFile exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community 7/25/2012 1:08:38 PM
|